summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRouven Czerwinski <r.czerwinski@pengutronix.de>2022-06-09 07:43:41 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-06-10 09:50:46 +0200
commit6acc6358ce6815220300d67b6b9e41a608480e16 (patch)
tree5fa5d6cb65875847867ff0ec2f21468c36d2678a /include
parent1519a45f57b84804bb59056d0eaadd3162c9292f (diff)
downloadbarebox-6acc6358ce6815220300d67b6b9e41a608480e16.tar.gz
barebox-6acc6358ce6815220300d67b6b9e41a608480e16.tar.xz
of: add of_get_reserve_map stub for !CONFIG_OFTREE
This allows us to unconditionally include of.h in files which did not require CONFIG_OFTREE, required for the MMU code in later patches. Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220609054342.661505-4-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/of.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/of.h b/include/of.h
index 46b96277d5..f8110e6734 100644
--- a/include/of.h
+++ b/include/of.h
@@ -58,7 +58,6 @@ struct of_reserve_map {
};
int of_add_reserve_entry(resource_size_t start, resource_size_t end);
-struct of_reserve_map *of_get_reserve_map(void);
void of_clean_reserve_map(void);
void fdt_add_reserve_map(void *fdt);
@@ -116,6 +115,7 @@ struct device_node *of_unflatten_dtb_const(const void *infdt, int size);
struct cdev;
#ifdef CONFIG_OFTREE
+extern struct of_reserve_map *of_get_reserve_map(void);
extern int of_bus_n_addr_cells(struct device_node *np);
extern int of_n_addr_cells(struct device_node *np);
extern int of_bus_n_size_cells(struct device_node *np);
@@ -318,6 +318,11 @@ 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);
#else
+static inline struct of_reserve_map *of_get_reserve_map(void)
+{
+ return NULL;
+}
+
static inline bool of_node_name_eq(const struct device_node *np, const char *name)
{
return false;