diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-08-08 14:41:49 -0700 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2017-08-31 19:57:37 -0700 |
commit | e05589df6f18d6417ae2463f1bd9d07daf661ffc (patch) | |
tree | dd929480571f7a303f46140cab1946ccce0a550d /arch | |
parent | 3f4cddb4c46dae818ae7fffc5b692128b2b73e67 (diff) |
imx: imx7: detect USB serial download protocol boot mode
The i.MX 7 boot ROM provides a structure with boot information.
The reference manual (chapter 6.6.14 Boot Information for Software
in the RM) only lists 6 boot devices, but tests have shown that
the boot device type is consistently 0xf in case the SoC has been
booted through USB Serial Downloader. Create a new boot mode for
the USB Serial Download Protocol (SDP).
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/cpu/armv7/mx7/soc.c | 3 | ||||
-rw-r--r-- | arch/arm/include/asm/arch-mx7/imx-regs.h | 1 | ||||
-rw-r--r-- | arch/arm/include/asm/imx-common/boot_mode.h | 1 |
3 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/mx7/soc.c b/arch/arm/cpu/armv7/mx7/soc.c index 5ea03a3d2bd..f2d0937aa87 100644 --- a/arch/arm/cpu/armv7/mx7/soc.c +++ b/arch/arm/cpu/armv7/mx7/soc.c @@ -432,6 +432,9 @@ enum boot_device get_boot_device(void) case BOOT_TYPE_SPINOR: boot_dev = SPI_NOR_BOOT; break; + case BOOT_TYPE_USB_SDP: + boot_dev = USB_SDP_BOOT; + break; default: break; } diff --git a/arch/arm/include/asm/arch-mx7/imx-regs.h b/arch/arm/include/asm/arch-mx7/imx-regs.h index d33be313c6e..a97a2f420fa 100644 --- a/arch/arm/include/asm/arch-mx7/imx-regs.h +++ b/arch/arm/include/asm/arch-mx7/imx-regs.h @@ -1213,6 +1213,7 @@ extern void pcie_power_off(void); #define BOOT_TYPE_QSPI 0x4 #define BOOT_TYPE_WEIM 0x5 #define BOOT_TYPE_SPINOR 0x6 +#define BOOT_TYPE_USB_SDP 0xf struct bootrom_sw_info { u8 reserved_1; diff --git a/arch/arm/include/asm/imx-common/boot_mode.h b/arch/arm/include/asm/imx-common/boot_mode.h index a8239f2f7a5..896a129c7a2 100644 --- a/arch/arm/include/asm/imx-common/boot_mode.h +++ b/arch/arm/include/asm/imx-common/boot_mode.h @@ -26,6 +26,7 @@ enum boot_device { MMC4_BOOT, NAND_BOOT, QSPI_BOOT, + USB_SDP_BOOT, UNKNOWN_BOOT, BOOT_DEV_NUM = UNKNOWN_BOOT, }; |