From 04e3a8fe4ae82bacd532e4fe91ec7a79260043e1 Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 24 Jun 2021 10:52:17 +0200 Subject: firmware: Load from global search path We have a global firmware search path, so use it. This removes the path argument from of_firmware_load_overlay(). blspec already extends the global firmware search path, so the path is not needed there. The of_overlay command has an option for specifying the search path, this is removed here, the global search path has to be used instead. Signed-off-by: Sascha Hauer Link: https://lore.barebox.org/20210624085223.14616-13-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer --- common/blspec.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'common') diff --git a/common/blspec.c b/common/blspec.c index c39805cb0b..148e52b038 100644 --- a/common/blspec.c +++ b/common/blspec.c @@ -39,7 +39,6 @@ static int blspec_apply_oftree_overlay(char *file, const char *abspath, struct fdt_header *fdt; struct device_node *overlay; char *path; - char *firmware_path; size_t size; path = basprintf("%s/%s", abspath, file); @@ -64,15 +63,7 @@ static int blspec_apply_oftree_overlay(char *file, const char *abspath, goto out; } - /* - * Unfortunately the device tree overlay contains only the filename of - * the firmware and relies on the firmware search paths to find the - * actual file. Use /lib/firmware in the Linux root directory and hope - * for the best. - */ - firmware_path = basprintf("%s/%s", abspath, "/lib/firmware"); - ret = of_firmware_load_overlay(overlay, firmware_path); - free(firmware_path); + ret = of_firmware_load_overlay(overlay); if (ret) { pr_warn("failed to load firmware: skip overlay \"%s\"\n", path); of_delete_node(overlay); -- cgit v1.2.3