diff options
author | Michael Tretter <m.tretter@pengutronix.de> | 2019-09-13 15:14:43 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-09-16 09:06:18 +0200 |
commit | f41d37ce080c24e296b10b3997a43dfa88591593 (patch) | |
tree | 18341ca093572874b71c782de3ae1629c7d9d316 /include | |
parent | 32559cecae49998091dd5645b386ed917f5c468d (diff) | |
download | barebox-f41d37ce080c24e296b10b3997a43dfa88591593.tar.gz barebox-f41d37ce080c24e296b10b3997a43dfa88591593.tar.xz |
firmware: add support to load firmware from dt overlay
fpga-region device tree nodes have the firmware-name property that
contains the file name of firmware in the firmware search path (but not
the path) that shall be loaded before the overlay is applied.
Add the of_firmware_load_overlay() function that accepts an overlay and a
firmware search path, finds the responsible firmware_mgr and loads the
firmware.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/of.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/of.h b/include/of.h index 06dc9f61a5..5466517a6d 100644 --- a/include/of.h +++ b/include/of.h @@ -882,6 +882,8 @@ int of_process_overlay(struct device_node *root, 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) @@ -908,6 +910,11 @@ static inline int of_process_overlay(struct device_node *root, { return -ENOSYS; } + +static inline int of_firmware_load_overlay(struct device_node *overlay, const char *path) +{ + return -ENOSYS; +} #endif #endif /* __OF_H */ |