diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-10-17 08:10:24 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-10-17 08:10:24 +0200 |
commit | 854cdfbe265ebd99619bc6edc594d59b07c156fe (patch) | |
tree | 072c0cab0db0e2b703db22add9608d16e8712140 /include | |
parent | 54709a8e5ed1e1d6c07bc24321aede08f27a1d58 (diff) | |
parent | 27112f5b5541d736a560dbc9f059d879d4b354a3 (diff) | |
download | barebox-854cdfbe265ebd99619bc6edc594d59b07c156fe.tar.gz barebox-854cdfbe265ebd99619bc6edc594d59b07c156fe.tar.xz |
Merge branch 'for-next/of-overlay'
Diffstat (limited to 'include')
-rw-r--r-- | include/firmware.h | 15 | ||||
-rw-r--r-- | include/of.h | 47 |
2 files changed, 62 insertions, 0 deletions
diff --git a/include/firmware.h b/include/firmware.h index 284e0f9705..7c01a77118 100644 --- a/include/firmware.h +++ b/include/firmware.h @@ -34,10 +34,25 @@ struct firmware_mgr; int firmwaremgr_register(struct firmware_handler *); struct firmware_mgr *firmwaremgr_find(const char *); +#ifdef CONFIG_FIRMWARE +struct firmware_mgr *firmwaremgr_find_by_node(const struct device_node *np); +#else +static inline struct firmware_mgr *firmwaremgr_find_by_node(const struct device_node *np) +{ + return NULL; +} +#endif void firmwaremgr_list_handlers(void); +#ifdef CONFIG_FIRMWARE int firmwaremgr_load_file(struct firmware_mgr *, const char *path); +#else +static inline int firmwaremgr_load_file(struct firmware_mgr *mgr, const char *path) +{ + return -ENOSYS; +} +#endif #define get_builtin_firmware(name, start, size) \ { \ diff --git a/include/of.h b/include/of.h index c8275e169b..98ddf795cb 100644 --- a/include/of.h +++ b/include/of.h @@ -871,4 +871,51 @@ static inline struct device_node *of_find_root_node(struct device_node *node) return node; } + +#ifdef CONFIG_OF_OVERLAY +struct device_node *of_resolve_phandles(struct device_node *root, + const struct device_node *overlay); +int of_overlay_apply_tree(struct device_node *root, + struct device_node *overlay); +int of_register_overlay(struct device_node *overlay); +int of_process_overlay(struct device_node *root, + struct device_node *overlay, + int (*process)(struct device_node *target, + struct device_node *overlay, void *data), + void *data); + +int of_firmware_load_overlay(struct device_node *overlay, const char *path); +#else +static inline struct device_node *of_resolve_phandles(struct device_node *root, + const struct device_node *overlay) +{ + return NULL; +} + +static inline int of_overlay_apply_tree(struct device_node *root, + struct device_node *overlay) +{ + return -ENOSYS; +} + +static inline int of_register_overlay(struct device_node *overlay) +{ + return -ENOSYS; +} + +static inline int of_process_overlay(struct device_node *root, + struct device_node *overlay, + int (*process)(struct device_node *target, + struct device_node *overlay, void *data), + void *data) +{ + return -ENOSYS; +} + +static inline int of_firmware_load_overlay(struct device_node *overlay, const char *path) +{ + return -ENOSYS; +} +#endif + #endif /* __OF_H */ |