summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/bootm.h2
-rw-r--r--include/complete.h1
-rw-r--r--include/globalvar.h14
-rw-r--r--include/linux/clk.h47
-rw-r--r--include/linux/mtd/bbm.h2
-rw-r--r--include/linux/string.h3
-rw-r--r--include/regulator.h5
-rw-r--r--include/restart.h6
8 files changed, 72 insertions, 8 deletions
diff --git a/include/bootm.h b/include/bootm.h
index ef5148f31e..51e9b3d71a 100644
--- a/include/bootm.h
+++ b/include/bootm.h
@@ -18,6 +18,7 @@ struct bootm_data {
const char *initrd_file;
const char *oftree_file;
const char *tee_file;
+ const char *root_dev;
int verbose;
enum bootm_verify verify;
bool force;
@@ -25,6 +26,7 @@ struct bootm_data {
/*
* appendroot - if true, try to add a suitable root= Kernel option to
* mount the rootfs from the same device as the Kernel comes from.
+ * The default rootfs device can be overridden with root_dev.
*/
bool appendroot;
/*
diff --git a/include/complete.h b/include/complete.h
index 763d256bf4..75a92fc86a 100644
--- a/include/complete.h
+++ b/include/complete.h
@@ -22,5 +22,6 @@ int devicetree_alias_complete(struct string_list *sl, char *instr);
int devicetree_nodepath_complete(struct string_list *sl, char *instr);
int devicetree_complete(struct string_list *sl, char *instr);
int devicetree_file_complete(struct string_list *sl, char *instr);
+int env_param_noeval_complete(struct string_list *sl, char *instr);
#endif /* __COMPLETE_ */
diff --git a/include/globalvar.h b/include/globalvar.h
index fc85e93e14..6f2c6db746 100644
--- a/include/globalvar.h
+++ b/include/globalvar.h
@@ -19,7 +19,9 @@ void globalvar_set_match(const char *match, const char *val);
int globalvar_add_simple_string(const char *name, char **value);
int globalvar_add_simple_int(const char *name, int *value,
const char *format);
-int globalvar_add_simple_bool(const char *name, int *value);
+int globalvar_add_bool(const char *name,
+ int (*set)(struct param_d *, void *),
+ int *value, void *priv);
int globalvar_add_simple_enum(const char *name, int *value,
const char * const *names, int max);
int globalvar_add_simple_bitmask(const char *name, unsigned long *value,
@@ -51,8 +53,9 @@ static inline int globalvar_add_simple_int(const char *name,
return 0;
}
-static inline int globalvar_add_simple_bool(const char *name,
- int *value)
+static inline int globalvar_add_bool(const char *name,
+ int (*set)(struct param_d *, void *),
+ int *value, void *priv)
{
return 0;
}
@@ -121,4 +124,9 @@ int nvvar_save(void);
int nv_complete(struct string_list *sl, char *instr);
int global_complete(struct string_list *sl, char *instr);
+static inline int globalvar_add_simple_bool(const char *name, int *value)
+{
+ return globalvar_add_bool(name, NULL, value, NULL);
+}
+
#endif /* __GLOBALVAR_H */
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 868bf3e4ed..c49fe9a54c 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -83,6 +83,27 @@ int __must_check clk_bulk_get(struct device_d *dev, int num_clks,
struct clk_bulk_data *clks);
/**
+ * clk_bulk_get_all - lookup and obtain all available references to clock
+ * producer.
+ * @dev: device for clock "consumer"
+ * @clks: pointer to the clk_bulk_data table of consumer
+ *
+ * This helper function allows drivers to get all clk consumers in one
+ * operation. If any of the clk cannot be acquired then any clks
+ * that were obtained will be freed before returning to the caller.
+ *
+ * Returns a positive value for the number of clocks obtained while the
+ * clock references are stored in the clk_bulk_data table in @clks field.
+ * Returns 0 if there're none and a negative value if something failed.
+ *
+ * Drivers must assume that the clock source is not enabled.
+ *
+ * clk_bulk_get should not be called from within interrupt context.
+ */
+int __must_check clk_bulk_get_all(struct device_d *dev,
+ struct clk_bulk_data **clks);
+
+/**
* clk_enable - inform the system when the clock source should be running.
* @clk: clock source
*
@@ -156,6 +177,19 @@ unsigned long clk_get_rate(struct clk *clk);
*/
void clk_bulk_put(int num_clks, struct clk_bulk_data *clks);
+/**
+ * clk_bulk_put_all - "free" all the clock source
+ * @num_clks: the number of clk_bulk_data
+ * @clks: the clk_bulk_data table of consumer
+ *
+ * Note: drivers must ensure that all clk_bulk_enable calls made on this
+ * clock source are balanced by clk_bulk_disable calls prior to calling
+ * this function.
+ *
+ * clk_bulk_put_all should not be called from within interrupt context.
+ */
+void clk_bulk_put_all(int num_clks, struct clk_bulk_data *clks);
+
/*
* The remaining APIs are optional for machine class support.
*/
@@ -240,8 +274,16 @@ static inline int __must_check clk_bulk_get(struct device_d *dev, int num_clks,
return 0;
}
+static inline int __must_check clk_bulk_get_all(struct device_d *dev,
+ struct clk_bulk_data **clks)
+{
+ return 0;
+}
+
static inline void clk_bulk_put(int num_clks, struct clk_bulk_data *clks) {}
+static inline void clk_bulk_put_all(int num_clks, struct clk_bulk_data *clks) {}
+
static inline int clk_enable(struct clk *clk)
{
return 0;
@@ -456,6 +498,7 @@ int clk_register(struct clk *clk);
struct clk *clk_lookup(const char *name);
void clk_dump(int verbose);
+void clk_dump_one(struct clk *clk, int verbose);
struct clk *clk_register_composite(const char *name,
const char * const *parent_names, int num_parents,
@@ -535,6 +578,10 @@ static inline struct clk *of_clk_get_by_name(struct device_node *np,
{
return ERR_PTR(-ENOENT);
}
+static inline unsigned int of_clk_get_parent_count(struct device_node *np)
+{
+ return 0;
+}
static inline int of_clk_init(struct device_node *root,
const struct of_device_id *matches)
{
diff --git a/include/linux/mtd/bbm.h b/include/linux/mtd/bbm.h
index 36bb6a503f..1e39883a2d 100644
--- a/include/linux/mtd/bbm.h
+++ b/include/linux/mtd/bbm.h
@@ -159,7 +159,7 @@ struct bbm_info {
int (*isbad_bbt)(struct mtd_info *mtd, loff_t ofs, int allowbbt);
- /* TODO Add more NAND specific fileds */
+ /* TODO Add more NAND specific fields */
struct nand_bbt_descr *badblock_pattern;
void *priv;
diff --git a/include/linux/string.h b/include/linux/string.h
index fd42f5020a..2b699957e8 100644
--- a/include/linux/string.h
+++ b/include/linux/string.h
@@ -8,10 +8,9 @@
extern "C" {
#endif
-extern char * ___strtok;
extern char * strpbrk(const char *,const char *);
-extern char * strtok(char *,const char *);
extern char * strsep(char **,const char *);
+extern char * strsep_unescaped(char **,const char *);
extern __kernel_size_t strspn(const char *,const char *);
diff --git a/include/regulator.h b/include/regulator.h
index 12d8e816cd..a9cb6dedca 100644
--- a/include/regulator.h
+++ b/include/regulator.h
@@ -175,6 +175,11 @@ static inline struct regulator *regulator_get(struct device_d *dev, const char *
return NULL;
}
+static inline struct regulator *regulator_get_name(const char *name)
+{
+ return NULL;
+}
+
static inline int regulator_enable(struct regulator *r)
{
return 0;
diff --git a/include/restart.h b/include/restart.h
index 7ec0910e94..2d15c7598a 100644
--- a/include/restart.h
+++ b/include/restart.h
@@ -2,7 +2,9 @@
#ifndef __INCLUDE_RESTART_H
#define __INCLUDE_RESTART_H
+void restart_handlers_print(void);
void __noreturn restart_machine(void);
+struct restart_handler *restart_handler_get_by_name(const char *name);
struct restart_handler {
void (*restart)(struct restart_handler *);
@@ -12,10 +14,10 @@ struct restart_handler {
};
int restart_handler_register(struct restart_handler *);
-int restart_handler_register_fn(void (*restart_fn)(struct restart_handler *));
+int restart_handler_register_fn(const char *name,
+ void (*restart_fn)(struct restart_handler *));
#define RESTART_DEFAULT_PRIORITY 100
-#define RESTART_DEFAULT_NAME "default"
unsigned int of_get_restart_priority(struct device_node *node);