aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-k3/include/mach/j721e_spl.h
diff options
context:
space:
mode:
authorAndreas Dannenberg <dannenberg@ti.com>2020-05-16 21:05:01 +0530
committerLokesh Vutla <lokeshvutla@ti.com>2020-05-19 14:40:54 +0530
commit7bf82cc1f8ac4c85f6eb1b7e37e302792fa954aa (patch)
treeac934fd286cea4e621348de2c0490ffd1ca4fd66 /arch/arm/mach-k3/include/mach/j721e_spl.h
parent62ca4aa16fcfaaa15e40ed26fe6826878d55ac59 (diff)
downloadu-boot-7bf82cc1f8ac4c85f6eb1b7e37e302792fa954aa.zip
u-boot-7bf82cc1f8ac4c85f6eb1b7e37e302792fa954aa.tar.gz
u-boot-7bf82cc1f8ac4c85f6eb1b7e37e302792fa954aa.tar.bz2
arm: mach-k3: j721e_init: Add support for backup boot modes
When the boot of J721E devices using the primary bootmode (configured via device pins) fails a boot using the configured backup bootmode is attempted. To take advantage of the backup boot mode feature go ahead and add support to the J721E init code to determine whether the ROM code performed the boot using the primary or backup boot mode, and if booted from the backup boot mode, decode the bootmode settings into the appropriate U-Boot mode accordingly so that the boot can proceed. Signed-off-by: Andreas Dannenberg <dannenberg@ti.com> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Diffstat (limited to 'arch/arm/mach-k3/include/mach/j721e_spl.h')
-rw-r--r--arch/arm/mach-k3/include/mach/j721e_spl.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/include/mach/j721e_spl.h b/arch/arm/mach-k3/include/mach/j721e_spl.h
index 475278b..1cabc01 100644
--- a/arch/arm/mach-k3/include/mach/j721e_spl.h
+++ b/arch/arm/mach-k3/include/mach/j721e_spl.h
@@ -25,7 +25,19 @@
#define BOOT_DEVICE_MMC2_2 0x16
#define BOOT_DEVICE_RAM 0x17
+/* Backup boot modes with MCU Only = 0 */
+#define BACKUP_BOOT_DEVICE_RAM 0x0
+#define BACKUP_BOOT_DEVICE_USB 0x1
+#define BACKUP_BOOT_DEVICE_UART 0x3
+#define BACKUP_BOOT_DEVICE_ETHERNET 0x4
+#define BACKUP_BOOT_DEVICE_MMC2 0x5
+#define BACKUP_BOOT_DEVICE_SPI 0x6
+#define BACKUP_BOOT_DEVICE_I2C 0x7
+
#define BOOT_MODE_B_SHIFT 4
#define BOOT_MODE_B_MASK BIT(4)
+#define K3_PRIMARY_BOOTMODE 0x0
+#define K3_BACKUP_BOOTMODE 0x1
+
#endif