When boot type could not be detected from rom sw info,
read sbmr1 to detect, here we only use it to detect FLEXSPI
boot, because ROM not update it in rom sw info.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
case BOOT_TYPE_SPINOR:
boot_dev = SPI_NOR_BOOT;
break;
-#ifdef CONFIG_IMX8M
case BOOT_TYPE_USB:
boot_dev = USB_BOOT;
break;
-#endif
default:
+#ifdef CONFIG_IMX8M
+ if (((readl(SRC_BASE_ADDR + 0x58) & 0x00007FFF) >> 12) == 0x4)
+ boot_dev = QSPI_BOOT;
+#endif
break;
}
return BOOT_DEVICE_NAND;
case SPI_NOR_BOOT:
return BOOT_DEVICE_SPI;
+ case QSPI_BOOT:
+ return BOOT_DEVICE_NOR;
case USB_BOOT:
return BOOT_DEVICE_USB;
default: