aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/mach-k3/am642_init.c
diff options
context:
space:
mode:
authorDave Gerlach2021-04-23 11:27:34 -0500
committerLokesh Vutla2021-05-12 16:27:57 +0530
commitb4a8c3b242aced38ee7aa1cce664f0108fc3242c (patch)
tree92300958abdf2c3c182545c8659ba851821de992 /arch/arm/mach-k3/am642_init.c
parent57dba04afbb7e06d3c1399bc38a2831c158ea478 (diff)
arm: mach-k3: am642: Unlock all applicable control MMR registers
To access various control MMR functionality the registers need to be unlocked. Do that for all control MMR regions in the MAIN domain. Signed-off-by: Dave Gerlach <d-gerlach@ti.com>
Diffstat (limited to 'arch/arm/mach-k3/am642_init.c')
-rw-r--r--arch/arm/mach-k3/am642_init.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-k3/am642_init.c b/arch/arm/mach-k3/am642_init.c
index 54944af2587..aa0eb72a870 100644
--- a/arch/arm/mach-k3/am642_init.c
+++ b/arch/arm/mach-k3/am642_init.c
@@ -15,12 +15,28 @@
#if defined(CONFIG_SPL_BUILD)
+static void ctrl_mmr_unlock(void)
+{
+ /* Unlock all PADCFG_MMR1 module registers */
+ mmr_unlock(PADCFG_MMR1_BASE, 1);
+
+ /* Unlock all CTRL_MMR0 module registers */
+ mmr_unlock(CTRL_MMR0_BASE, 0);
+ mmr_unlock(CTRL_MMR0_BASE, 1);
+ mmr_unlock(CTRL_MMR0_BASE, 2);
+ mmr_unlock(CTRL_MMR0_BASE, 3);
+ mmr_unlock(CTRL_MMR0_BASE, 5);
+ mmr_unlock(CTRL_MMR0_BASE, 6);
+}
+
void board_init_f(ulong dummy)
{
#if defined(CONFIG_CPU_V7R)
setup_k3_mpu_regions();
#endif
+ ctrl_mmr_unlock();
+
/* Init DM early */
spl_early_init();