On the iMX platforms the USB boot is in fact boot from USB serial
download and not from a USB mass storage. So returning BOOT_DEVICE_USB
typically doesn't make sense as USB SPD is then used to continue
booting, for this we need to return BOOT_DEVICE_BOARD.
Still return BOOT_DEVICE_USB when USB mass storage support has been
built in the SPL. With USB-C on both side, the programmer could switch
back to device mode and use the exposed mass storage device after the
serial download finished.
Signed-off-by: Alban Bedel
---
arch/arm/mach-imx/spl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/arm/mach-imx/spl.c b/arch/arm/mach-imx/spl.c
index 64ca29677212..2c2b2b126ad7 100644
--- a/arch/arm/mach-imx/spl.c
+++ b/arch/arm/mach-imx/spl.c
@@ -177,7 +177,8 @@ u32 spl_boot_device(void)
case QSPI_BOOT:
return BOOT_DEVICE_NOR;
case USB_BOOT:
- return BOOT_DEVICE_USB;
+ return IS_ENABLED(CONFIG_SPL_USB_STORAGE) ?
+ BOOT_DEVICE_USB : BOOT_DEVICE_BOARD;
default:
return BOOT_DEVICE_NONE;
}
--
2.32.0
smime.p7s
Description: S/MIME cryptographic signature