diff options
author | Rob Herring <robh@kernel.org> | 2018-09-28 15:48:39 -0500 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2018-09-28 15:48:39 -0500 |
commit | 389d0a8a7af8ff8bb6301382333c7e8f748d7cd6 (patch) | |
tree | 8a9704aad28ad8f1c11c947026b0f22dfffb0ca5 /include/linux/of.h | |
parent | da08d8cb8cfc58a340fc5e163385b5dfd714d762 (diff) | |
parent | 4c29e5934f6c35df2601d593ddfa737b7932bde6 (diff) |
Merge branch 'dt/cpu-type-rework' into dt/next
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 2141490b368f..f581531d797e 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -347,6 +347,8 @@ extern const void *of_get_property(const struct device_node *node, const char *name, int *lenp); extern struct device_node *of_get_cpu_node(int cpu, unsigned int *thread); +extern struct device_node *of_get_next_cpu_node(struct device_node *prev); + #define for_each_property_of_node(dn, pp) \ for (pp = dn->properties; pp != NULL; pp = pp->next) @@ -748,6 +750,11 @@ static inline struct device_node *of_get_cpu_node(int cpu, return NULL; } +static inline struct device_node *of_get_next_cpu_node(struct device_node *prev) +{ + return NULL; +} + static inline int of_n_addr_cells(struct device_node *np) { return 0; @@ -1211,6 +1218,10 @@ static inline int of_property_read_s32(const struct device_node *np, for (child = of_get_next_available_child(parent, NULL); child != NULL; \ child = of_get_next_available_child(parent, child)) +#define for_each_of_cpu_node(cpu) \ + for (cpu = of_get_next_cpu_node(NULL); cpu != NULL; \ + cpu = of_get_next_cpu_node(cpu)) + #define for_each_node_with_property(dn, prop_name) \ for (dn = of_find_node_with_property(NULL, prop_name); dn; \ dn = of_find_node_with_property(dn, prop_name)) |