]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
imx8m: add QSPI boot dev
authorPeng Fan <peng.fan@nxp.com>
Thu, 17 May 2018 07:15:59 +0000 (15:15 +0800)
committerStefano Babic <sbabic@denx.de>
Sat, 23 Jan 2021 10:30:31 +0000 (11:30 +0100)
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>
arch/arm/mach-imx/cpu.c
arch/arm/mach-imx/spl.c

index af0b7fbf7b44398614d90ad3601eea4b51e6e801..38b87ed5c39a9daf0251c7f52d3d68addd297087 100644 (file)
@@ -467,12 +467,14 @@ enum boot_device get_boot_device(void)
        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;
        }
 
index aa2686bb921aa89fa350349eed1d1f7eaed8530a..2d15f62445c94623023913508b39009cc14d0076 100644 (file)
@@ -172,6 +172,8 @@ u32 spl_boot_device(void)
                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: