}
#endif
+/* Weak default function for arch/board-specific fixups to the spl_image_info */
+void __weak spl_perform_fixups(struct spl_image_info *spl_image)
+{
+}
+
void spl_fixup_fdt(void)
{
#if defined(CONFIG_SPL_OF_LIBFDT) && defined(CONFIG_SYS_SPL_ARGS_ADDR)
else
puts("SPL: Unsupported Boot Device!\n");
#endif
- if (loader && !spl_load_image(spl_image, loader))
+ if (loader && !spl_load_image(spl_image, loader)) {
+ spl_image->boot_device = spl_boot_list[i];
return 0;
+ }
}
return -ENODEV;
#ifdef CONFIG_SYS_SPL_ARGS_ADDR
spl_image.arg = (void *)CONFIG_SYS_SPL_ARGS_ADDR;
#endif
+ spl_image.boot_device = BOOT_DEVICE_NONE;
board_boot_order(spl_boot_list);
if (boot_from_devices(&spl_image, spl_boot_list,
hang();
}
+ spl_perform_fixups(&spl_image);
+
#ifdef CONFIG_CPU_V7M
spl_image.entry_point |= 0x1;
#endif
#if CONFIG_IS_ENABLED(LOAD_FIT)
void *fdt_addr;
#endif
+ u32 boot_device;
u32 size;
u32 flags;
void *arg;
* can implement 'board_return_to_bootrom'.
*/
void board_return_to_bootrom(void);
+
+/**
+ * spl_perform_fixups() - arch/board-specific callback before processing
+ * the boot-payload
+ */
+void spl_perform_fixups(struct spl_image_info *spl_image);
#endif