CTRLMMR_MAIN_DEVSTAT_EMMC_PORT_SHIFT;
if (port == 0x1)
bootmode = BOOT_DEVICE_MMC2;
+ } else if (bootmode == BOOT_DEVICE_DFU) {
+ u32 mode = (devstat & CTRLMMR_MAIN_DEVSTAT_USB_MODE_MASK) >>
+ CTRLMMR_MAIN_DEVSTAT_USB_MODE_SHIFT;
+ if (mode == 0x2)
+ bootmode = BOOT_DEVICE_USB;
}
return bootmode;
#define CTRLMMR_MAIN_DEVSTAT_EMMC_PORT_SHIFT 14
#define CTRLMMR_MAIN_DEVSTAT_BKUP_MMC_PORT_MASK GENMASK(17, 17)
#define CTRLMMR_MAIN_DEVSTAT_BKUP_MMC_PORT_SHIFT 12
+#define CTRLMMR_MAIN_DEVSTAT_USB_MODE_SHIFT 9
+#define CTRLMMR_MAIN_DEVSTAT_USB_MODE_MASK GENMASK(10, 9)
#define WKUP_CTRL_MMR0_BASE 0x43000000
#define MCU_CTRL_MMR0_BASE 0x40f00000
#define BOOT_DEVICE_I2C 0x05
#define BOOT_DEVICE_MMC2 0x06
#define BOOT_DEVICE_ETHERNET 0x07
-#define BOOT_DEVICE_USB 0x08
+#define BOOT_DEVICE_DFU 0x08
+#define BOOT_DEVICE_USB 0x408
#define BOOT_DEVICE_PCIE 0x09
#define BOOT_DEVICE_UART 0x0a
#define BOOT_DEVICE_NAND 0x0c