aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorWadim Egorov2024-04-03 15:59:09 +0200
committerTom Rini2024-04-11 20:45:10 -0600
commitd1cba4a450b918d9a0f218acffb04f91b07831e9 (patch)
tree95398164eaae8f829c9bf8f42e1577d434ed9a36 /arch
parent128f81290b7d4f20a11c7754798b1896575b7a29 (diff)
arm: mach-k3: am625: copy bootindex to OCRAM for main domain SPL
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-k3/am625_init.c8
-rw-r--r--arch/arm/mach-k3/include/mach/am62_hardware.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/am625_init.c b/arch/arm/mach-k3/am625_init.c
index 961f36e6549..2d31abac912 100644
--- a/arch/arm/mach-k3/am625_init.c
+++ b/arch/arm/mach-k3/am625_init.c
@@ -236,6 +236,14 @@ void board_init_f(ulong dummy)
}
/*
+ * 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.
*/
diff --git a/arch/arm/mach-k3/include/mach/am62_hardware.h b/arch/arm/mach-k3/include/mach/am62_hardware.h
index 90682d8ee31..bcbc4821c82 100644
--- a/arch/arm/mach-k3/include/mach/am62_hardware.h
+++ b/arch/arm/mach-k3/include/mach/am62_hardware.h
@@ -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