From eb1d3c2f4e5408575b470e5b1bf963c1df43491b Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Thu, 24 Jun 2021 10:52:18 +0200 Subject: 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 Link: https://lore.barebox.org/20210624085223.14616-14-s.hauer@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/lib64/armlinux.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'arch/arm/lib64') diff --git a/arch/arm/lib64/armlinux.c b/arch/arm/lib64/armlinux.c index 0ba4d30b8e..078841b1d4 100644 --- a/arch/arm/lib64/armlinux.c +++ b/arch/arm/lib64/armlinux.c @@ -11,11 +11,16 @@ static int do_bootm_linux(struct image_data *data) void (*fn)(unsigned long dtb, unsigned long x1, unsigned long x2, unsigned long x3); phys_addr_t devicetree; + int ret; fn = booti_load_image(data, &devicetree); if (IS_ERR(fn)) return PTR_ERR(fn); + ret = of_overlay_load_firmware(); + if (ret) + return ret; + shutdown_barebox(); fn(devicetree, 0, 0, 0); -- cgit v1.2.3