diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-24 10:52:18 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2021-06-28 12:36:38 +0200 |
commit | eb1d3c2f4e5408575b470e5b1bf963c1df43491b (patch) | |
tree | c4300c0cee68df789c12902f03604e37a9fd7979 /include | |
parent | 04e3a8fe4ae82bacd532e4fe91ec7a79260043e1 (diff) | |
download | barebox-eb1d3c2f4e5408575b470e5b1bf963c1df43491b.tar.gz |
blspec: Rework firmware load
Applying overlays in blspec currently works in two steps. First
of_firmware_load_overlay() is called which doesn't load an overlay,
but instead loads firmware when one is needed by the overlay. This
is done on the live tree, because that was needed to find the firmware
manager. The second step is to call of_register_overlay() to apply
the overlay to the kernel device tree when the fixups are executed.
Instead of using a separate step to load the firmware, load the firmware
as part of the of_fixups.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Link: https://lore.barebox.org/20210624085223.14616-14-s.hauer@pengutronix.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/include/of.h b/include/of.h index e1752fb28f..59c1250fb2 100644 --- a/include/of.h +++ b/include/of.h @@ -1035,7 +1035,9 @@ int of_process_overlay(struct device_node *root, struct device_node *overlay, void *data), void *data); -int of_firmware_load_overlay(struct device_node *overlay); +int of_overlay_pre_load_firmware(struct device_node *root, struct device_node *overlay); +int of_overlay_load_firmware(void); +void of_overlay_load_firmware_clear(void); #else static inline struct device_node *of_resolve_phandles(struct device_node *root, const struct device_node *overlay) @@ -1069,10 +1071,21 @@ static inline int of_process_overlay(struct device_node *root, return -ENOSYS; } -static inline int of_firmware_load_overlay(struct device_node *overlay) +static inline int of_overlay_pre_load_firmware(struct device_node *root, + struct device_node *overlay) { return -ENOSYS; } + +static inline int of_overlay_load_firmware(void) +{ + return 0; +} + +static inline void of_overlay_load_firmware_clear(void) +{ +} + #endif #endif /* __OF_H */ |