summaryrefslogtreecommitdiffstats
path: root/include/bbu.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2018-07-02 06:24:30 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2018-07-02 06:24:33 +0200
commita3c321eb53ac9d40d972d735a52be11ce17c8494 (patch)
tree6c5bd98fd4f5cb93354ead467f92d73ad206c87f /include/bbu.h
parent4f0d5a3c97f35dcfa8931b2016877959c5f7a7b7 (diff)
downloadbarebox-a3c321eb53ac9d40d972d735a52be11ce17c8494.tar.gz
barebox-a3c321eb53ac9d40d972d735a52be11ce17c8494.tar.xz
bbu: reserve upper 16 bits for handler specific flags
Let the handler store 16 bit of handler specific flags in the generic handler struct. The setup functions of some bbu handlers let the user specify a flags field. With this change they can now pass generic and handler specific flags in a single variable without having to use a second parameter. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/bbu.h')
-rw-r--r--include/bbu.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/bbu.h b/include/bbu.h
index def568e498..d1ab9f5638 100644
--- a/include/bbu.h
+++ b/include/bbu.h
@@ -25,6 +25,10 @@ struct bbu_handler {
struct list_head list;
#define BBU_HANDLER_FLAG_DEFAULT (1 << 0)
#define BBU_HANDLER_CAN_REFRESH (1 << 1)
+ /*
+ * The lower 16bit are generic flags, the upper 16bit are reserved
+ * for handler specific flags.
+ */
unsigned long flags;
/* default device file, can be overwritten on the command line */