diff options
author | Ahmad Fatoum <a.fatoum@pengutronix.de> | 2022-06-09 13:18:10 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-06-15 07:05:32 +0200 |
commit | afae0a8e6524e9ca701555d7362b8a0e2df9b84e (patch) | |
tree | 7ddd2b1fe24fbc8cd7e9a600a917ce4bed61e02b /include | |
parent | d9f85c418cab518586db146bd39e59f8aea77a14 (diff) | |
download | barebox-afae0a8e6524e9ca701555d7362b8a0e2df9b84e.tar.gz barebox-afae0a8e6524e9ca701555d7362b8a0e2df9b84e.tar.xz |
of: request reserved memory regions so other code can't
Add a new of_reserved_mem_walk that can be used to request
reserved memory regions. This avoids e.g. bootm trying to
place the kernel into a reserved region.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://lore.barebox.org/20220609111810.2454588-3-a.fatoum@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h index f8110e6734..3c5f14e167 100644 --- a/include/of.h +++ b/include/of.h @@ -63,6 +63,7 @@ void fdt_add_reserve_map(void *fdt); struct device_d; struct driver_d; +struct resource; int of_fix_tree(struct device_node *); @@ -317,6 +318,9 @@ struct device_node *of_find_node_by_path_or_alias(struct device_node *root, int of_autoenable_device_by_path(char *path); int of_autoenable_i2c_by_component(char *path); int of_prepend_machine_compatible(struct device_node *root, const char *compat); + +int of_reserved_mem_walk(int (*handler)(const struct resource *res)); + #else static inline struct of_reserve_map *of_get_reserve_map(void) { @@ -846,6 +850,11 @@ static inline int of_prepend_machine_compatible(struct device_node *root, return -ENODEV; } +static inline int of_reserved_mem_walk(int (*handler)(const struct resource *res)) +{ + return 0; +} + #endif #define for_each_property_of_node(dn, pp) \ |