summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-11-16 14:01:09 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2012-11-16 14:01:09 +0100
commitbf38ac7b89dee71d14d4d65e9ad0d0cb727cbb98 (patch)
tree3cf8336e5c2c6341120a2b68f8bb7a5df385fb64 /include
parent38c75d0f112d4e8bc3762cd8d0b6dbae3cf7e441 (diff)
parent4f2ac27e2503e15bffdebca4757e02638686fe94 (diff)
downloadbarebox-bf38ac7b89dee71d14d4d65e9ad0d0cb727cbb98.tar.gz
barebox-bf38ac7b89dee71d14d4d65e9ad0d0cb727cbb98.tar.xz
Merge branch 'for-next/imx'
Conflicts: arch/arm/boards/guf-neso/lowlevel.c arch/arm/boards/pcm038/lowlevel.c commands/Makefile
Diffstat (limited to 'include')
-rw-r--r--include/bbu.h49
-rw-r--r--include/linux/clk.h2
-rw-r--r--include/reset_source.h6
3 files changed, 57 insertions, 0 deletions
diff --git a/include/bbu.h b/include/bbu.h
new file mode 100644
index 0000000000..095eebcf4a
--- /dev/null
+++ b/include/bbu.h
@@ -0,0 +1,49 @@
+#ifndef __INCLUDE_BBU_H
+#define __INCLUDE_BBU_H
+
+struct bbu_data {
+#define BBU_FLAG_FORCE (1 << 0)
+#define BBU_FLAG_YES (1 << 1)
+ unsigned long flags;
+ int force;
+ void *image;
+ const char *imagefile;
+ const char *devicefile;
+ size_t len;
+ const char *handler_name;
+};
+
+struct bbu_handler {
+ int (*handler)(struct bbu_handler *, struct bbu_data *);
+ const char *name;
+ struct list_head list;
+#define BBU_HANDLER_FLAG_DEFAULT (1 << 0)
+ unsigned long flags;
+
+ /* default device file, can be overwritten on the command line */
+ const char *devicefile;
+};
+
+int bbu_force(struct bbu_data *, const char *fmt, ...)
+ __attribute__ ((format(__printf__, 2, 3)));
+
+int bbu_confirm(struct bbu_data *);
+
+int barebox_update(struct bbu_data *);
+
+void bbu_handlers_list(void);
+
+#ifdef CONFIG_BAREBOX_UPDATE
+
+int bbu_register_handler(struct bbu_handler *);
+
+#else
+
+static inline int bbu_register_handler(struct bbu_handler *unused)
+{
+ return -EINVAL;
+}
+
+#endif
+
+#endif /* __INCLUDE_BBU_H */
diff --git a/include/linux/clk.h b/include/linux/clk.h
index e9031dd17a..00588bff05 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -188,6 +188,8 @@ struct clk *clk_fixed_factor(const char *name,
const char *parent, unsigned int mult, unsigned int div);
struct clk *clk_mux(const char *name, void __iomem *reg,
u8 shift, u8 width, const char **parents, u8 num_parents);
+struct clk *clk_gate(const char *name, const char *parent, void __iomem *reg,
+ u8 shift);
int clk_register(struct clk *clk);
diff --git a/include/reset_source.h b/include/reset_source.h
index 6734fbdee6..75e7ba8d40 100644
--- a/include/reset_source.h
+++ b/include/reset_source.h
@@ -22,6 +22,12 @@ enum reset_src_type {
RESET_JTAG, /* JTAG reset */
};
+#ifdef CONFIG_RESET_SOURCE
void set_reset_source(enum reset_src_type);
+#else
+static inline void set_reset_source(enum reset_src_type unused)
+{
+}
+#endif
#endif /* __INCLUDE_RESET_SOURCE_H */