]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: am625: copy bootindex to OCRAM for main domain SPL
authorWadim Egorov <w.egorov@phytec.de>
Wed, 3 Apr 2024 13:59:09 +0000 (15:59 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 12 Apr 2024 02:45:10 +0000 (20:45 -0600)
Relocate booindex to OCRAM region after it gets opened by TIFS so
the main domain bootloaders can have access to this data.

Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
arch/arm/mach-k3/am625_init.c
arch/arm/mach-k3/include/mach/am62_hardware.h

index 961f36e654988b9cc32723364718c85b9b30483b..2d31abac9121fcdb8eea7cfd18e4cb1dc4accb7d 100644 (file)
@@ -235,6 +235,14 @@ void board_init_f(ulong dummy)
                k3_sysfw_loader(true, NULL, NULL);
        }
 
+       /*
+        * Relocate boot information to OCRAM (after TIFS has opend this
+        * region for us) so the next bootloader stages can keep access to
+        * primary vs backup bootmodes.
+        */
+       if (IS_ENABLED(CONFIG_CPU_V7R))
+               writel(bootindex, K3_BOOT_PARAM_TABLE_INDEX_OCRAM);
+
        /*
         * Force probe of clk_k3 driver here to ensure basic default clock
         * configuration is always done.
index 90682d8ee31fe6257a0fe18568a360859c65a754..bcbc4821c82f5154ec4605fe6c09cff02f6f7c50 100644 (file)
@@ -83,6 +83,7 @@
 #define CTRLMMR_DBOUNCE_CFG(index)             (MCU_CTRL_MMR0_BASE + 0x4080 + (index * 4))
 
 #define ROM_EXTENDED_BOOT_DATA_INFO            0x43c3f1e0
+#define K3_BOOT_PARAM_TABLE_INDEX_OCRAM                0x7000F290
 
 #define TI_SRAM_SCRATCH_BOARD_EEPROM_START     0x43c30000