diff mbox series

[v2,08/19] arm: mach-k3: j721e: Fix unlocking control module registers

Message ID 20200805171431.5737-9-lokeshvutla@ti.com
State Changes Requested
Delegated to: Lokesh Vutla
Headers show
Series arm: mach-k3: Initial support for Texas Instrument's J7200 Platform | expand

Commit Message

Lokesh Vutla Aug. 5, 2020, 5:14 p.m. UTC
In main control mmr there is no partition 4 and partition 6 is available
only on J721e. Fix the same in ctrl_mmr_unlock function

Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Suman Anna <s-anna@ti.com>
---
 arch/arm/mach-k3/j721e_init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/arch/arm/mach-k3/j721e_init.c b/arch/arm/mach-k3/j721e_init.c
index 3b15da2d7c..63a31c18ce 100644
--- a/arch/arm/mach-k3/j721e_init.c
+++ b/arch/arm/mach-k3/j721e_init.c
@@ -87,9 +87,9 @@  static void ctrl_mmr_unlock(void)
 	mmr_unlock(CTRL_MMR0_BASE, 1);
 	mmr_unlock(CTRL_MMR0_BASE, 2);
 	mmr_unlock(CTRL_MMR0_BASE, 3);
-	mmr_unlock(CTRL_MMR0_BASE, 4);
 	mmr_unlock(CTRL_MMR0_BASE, 5);
-	mmr_unlock(CTRL_MMR0_BASE, 6);
+	if (soc_is_j721e())
+		mmr_unlock(CTRL_MMR0_BASE, 6);
 	mmr_unlock(CTRL_MMR0_BASE, 7);
 }