From f41d37ce080c24e296b10b3997a43dfa88591593 Mon Sep 17 00:00:00 2001 From: Michael Tretter Date: Fri, 13 Sep 2019 15:14:43 +0200 Subject: 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 Signed-off-by: Sascha Hauer --- include/of.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') 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 */ -- cgit v1.2.3