SPL: allow fall-back to SDP boot
RFC PATCH 1/1 SPL: allow fall-back to SDP boot
When SDP is enabled, allow it to be invoked as a fall-back to allow re-programming a board with a full U-Boot loaded over USB.
Signed-off-by Eric Nelson <[email protected]>
---
Since SDP loading is triggered through BOOT_DEVICE_BOARD, I'm not sure if this should be specific to SDP.
common/spl/spl.c | 12 ++++++++++++ 1 file changed, 12 insertions(+)
common/spl/spl.c +12 -0
@@ -373,6 +373,9 @@ static int boot_from_devices(struct spl_image_info *spl_image,void board_init_r (gd_t *dummy1,ulong dummy2) { +#ifdef CONFIG_SPL_USB_SDP_SUPPORT +int i; +#endif u32 spl_boot_list[] = {BOOT_DEVICE_NONE ,BOOT_DEVICE_NONE ,
@@ -417,6 +420,15 @@ void board_init_r(gd_t *dummy1, ulong dummy2)#endif board_boot_order (spl_boot_list); +#ifdef CONFIG_SPL_USB_SDP_SUPPORT +for (i =0 ; i <ARRAY_SIZE (spl_boot_list); i++) { +if (spl_boot_list[i] ==BOOT_DEVICE_NONE ) { + spl_boot_list[i] =BOOT_DEVICE_BOARD ; +break ; + } + } +#endif +if (boot_from_devices (&spl_image, spl_boot_list,ARRAY_SIZE (spl_boot_list))) {puts ("SPL: failed to boot from all boot devices\n" );
Signature · 1 line
2.7.4