summaryrefslogtreecommitdiffstats
path: root/arch/kvx
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2021-06-24 10:52:18 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2021-06-28 12:36:38 +0200
commiteb1d3c2f4e5408575b470e5b1bf963c1df43491b (patch)
treec4300c0cee68df789c12902f03604e37a9fd7979 /arch/kvx
parent04e3a8fe4ae82bacd532e4fe91ec7a79260043e1 (diff)
downloadbarebox-eb1d3c2f4e5408575b470e5b1bf963c1df43491b.tar.gz
barebox-eb1d3c2f4e5408575b470e5b1bf963c1df43491b.tar.xz
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 'arch/kvx')
-rw-r--r--arch/kvx/lib/bootm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/kvx/lib/bootm.c b/arch/kvx/lib/bootm.c
index 198eef7980..4d17e1846d 100644
--- a/arch/kvx/lib/bootm.c
+++ b/arch/kvx/lib/bootm.c
@@ -24,11 +24,17 @@ typedef void __noreturn (*boot_func_entry)(unsigned long, void *);
static int do_boot_entry(struct image_data *data, boot_func_entry entry,
void *fdt_load_addr)
{
+ int ret;
+
printf("starting elf (entry at %p)\n", entry);
if (data->dryrun)
return 0;
+ ret = of_overlay_load_firmware();
+ if (ret)
+ return ret;
+
shutdown_barebox();
/* Synchronize I-cache with D-cache */