]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: j721e: Enable OSPI boot
authorJonathan Humphreys <j-humphreys@ti.com>
Sat, 24 Feb 2024 00:23:06 +0000 (18:23 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 5 Mar 2024 13:39:49 +0000 (08:39 -0500)
Add boot ROM XSPI bootmode, and set to BOOT_DEVICE_SPI if detected.

Signed-off-by: Jonathan Humphreys <j-humphreys@ti.com>
Reviewed-by: Udit Kumar <u-kumar1@ti.com>
arch/arm/mach-k3/include/mach/j721e_spl.h
arch/arm/mach-k3/j721e_init.c

index ed3d7333bd4f166f4d701b95cc2ab210b077d52a..aaee653537692db2a12f807cebe64a1982a0cf03 100644 (file)
@@ -24,8 +24,9 @@
 #define BOOT_DEVICE_UFS                        0x13
 #define BOOT_DEVIE_GPMC                        0x14
 #define BOOT_DEVICE_PCIE               0x15
-#define BOOT_DEVICE_MMC2_2             0x16
-#define BOOT_DEVICE_RAM                        0x17
+#define BOOT_DEVICE_XSPI               0x16
+#define BOOT_DEVICE_RAM                0x17
+#define BOOT_DEVICE_MMC2_2             0xFF /* Invalid value */
 
 /* Backup boot modes with MCU Only = 0 */
 #define BACKUP_BOOT_DEVICE_RAM         0x0
index c2976c4ea0dff92cb136ef8a9a460dc0e40dc785..7ee9b75de4daba7d549bac66d3c218d4e46b4113 100644 (file)
@@ -346,7 +346,8 @@ static u32 __get_primary_bootmedia(u32 main_devstat, u32 wkup_devstat)
        bootmode |= (main_devstat & MAIN_DEVSTAT_BOOT_MODE_B_MASK) <<
                        BOOT_MODE_B_SHIFT;
 
-       if (bootmode == BOOT_DEVICE_OSPI || bootmode == BOOT_DEVICE_QSPI)
+       if (bootmode == BOOT_DEVICE_OSPI || bootmode == BOOT_DEVICE_QSPI ||
+           bootmode == BOOT_DEVICE_XSPI)
                bootmode = BOOT_DEVICE_SPI;
 
        if (bootmode == BOOT_DEVICE_MMC2) {