summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVolodymyr Riazantsev <x0153367@ti.com>2011-07-21 19:05:09 +0300
committerSebastien Jan <s-jan@ti.com>2011-07-28 11:22:59 +0200
commite11a5f03df8f7663911be4b8bb9a8dc6bc8a583b (patch)
tree9db120d370e39426ef51c884626a6b0d65ecf56a
parentc1e5d2c8d5bec6bfebaac8ff8a587d4fce6df67a (diff)
OMAP4: L2C: Add restore L2$ POR value for GP devices
Added code for set/restore value of L2 cache controller POR register for GP devices via SMC API. Change-Id: Ieb2ff2fd79b411986aae6c20b21fc44eec514a32 Signed-off-by: Volodymyr Riazantsev <x0153367@ti.com>
-rw-r--r--arch/arm/mach-omap2/omap4-common.c3
-rw-r--r--arch/arm/mach-omap2/sleep44xx.S29
2 files changed, 23 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/omap4-common.c b/arch/arm/mach-omap2/omap4-common.c
index 7a73b26faa03..69e284a6b4be 100644
--- a/arch/arm/mach-omap2/omap4-common.c
+++ b/arch/arm/mach-omap2/omap4-common.c
@@ -249,7 +249,8 @@ static int __init omap_l2_cache_init(void)
omap4_secure_dispatcher(
PPA_SERVICE_PL310_POR, 0x7, 1,
l2x0_por, 0, 0, 0);
- }
+ } else if (omap_rev() > OMAP4430_REV_ES2_1)
+ omap_smc1(0x113, l2x0_por);
/*
* FIXME : Temporary WA for the OMAP4460 stability
diff --git a/arch/arm/mach-omap2/sleep44xx.S b/arch/arm/mach-omap2/sleep44xx.S
index 3a33da92716d..8c34755237b5 100644
--- a/arch/arm/mach-omap2/sleep44xx.S
+++ b/arch/arm/mach-omap2/sleep44xx.S
@@ -175,21 +175,34 @@ skip_enable_smp_bit: @ GP device should execute from here
smc #0
b skip_l2en
check_por:
- ldr r0, =OMAP44XX_SAR_RAM_BASE @ Check DEVICE type
- ldr r1, [r0, #OMAP_TYPE_OFFSET]
- cmp r1, #0x1 @ Check for HS device
- bne skip_por
CPU_REV_CMP #0xa @Check for 4460 family
itt lt
- adrlt r3, POR_params @Check for ES1.0
- blt por_setup
- CPU_MINOR_REV_CMP #0x0
+ adrlt r3, POR_params
+ blt check_dev_type
+ CPU_MINOR_REV_CMP #0x0 @Check for ES1.0
ite eq
adreq r3, POR_4460es10_params
adrgt r3, POR_4460_params
-por_setup:
+check_dev_type:
+ ldr r0, =OMAP44XX_SAR_RAM_BASE @ Check DEVICE type
+ ldr r1, [r0, #OMAP_TYPE_OFFSET]
+ cmp r1, #0x1 @Check for HS device
+ bne por_setup_gp
+por_setup_emu:
ldr r0, =PPA_SERVICE_PL310_POR @ Setup PPA HAL call
LM_CALL_PPA_SERVICE_PA
+ b skip_por
+por_setup_gp:
+ adr r4, POR_params
+ cmp r3, r4
+ bne smc_call
+ CPU_MINOR_REV_CMP #0x4 @Check for ES2.2
+ blt skip_por
+smc_call:
+ ldr r0, [r3, #0x4]
+ ldr r12, =0x113 @Setup POR value
+ dsb
+ smc #0
skip_por:
CPU_REV_CMP #0xa @Check for 4460 family
itt lt