diff options
author | Antony Pavlov <antonynpavlov@gmail.com> | 2016-07-06 23:38:25 +0300 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-07-07 09:29:54 +0200 |
commit | adce981d2449004dfcea432d48a1a57556f0c994 (patch) | |
tree | 6f8b1e0b83546ae2f3e855bdb256e3368eb55815 /include | |
parent | 865e80f771e86c20c7091f77c898715270d2c388 (diff) | |
download | barebox-adce981d2449004dfcea432d48a1a57556f0c994.tar.gz barebox-adce981d2449004dfcea432d48a1a57556f0c994.tar.xz |
of: base: import of_get_cpu_node() from linux-v4.7-rc2
Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h index 8c8f57a7cc..ed6e870473 100644 --- a/include/of.h +++ b/include/of.h @@ -111,6 +111,7 @@ extern struct property *of_find_property(const struct device_node *np, const char *name, int *lenp); extern const void *of_get_property(const struct device_node *np, const char *name, int *lenp); +extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); extern int of_set_property(struct device_node *node, const char *p, const void *val, int len, int create); @@ -347,6 +348,12 @@ static inline const void *of_get_property(const struct device_node *np, return NULL; } +static inline struct device_node *of_get_cpu_node(int cpu, + unsigned int *thread) +{ + return NULL; +} + static inline int of_set_property(struct device_node *node, const char *p, const void *val, int len, int create) { @@ -639,6 +646,9 @@ static inline struct device_node *of_find_node_by_path_or_alias( #define for_each_node_by_name(dn, name) \ for (dn = of_find_node_by_name(NULL, name); dn; \ dn = of_find_node_by_name(dn, name)) +#define for_each_node_by_type(dn, type) \ + for (dn = of_find_node_by_type(NULL, type); dn; \ + dn = of_find_node_by_type(dn, type)) #define for_each_node_by_name_from(dn, root, name) \ for (dn = of_find_node_by_name(root, name); dn; \ dn = of_find_node_by_name(dn, name)) |