summaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-samsung
diff options
context:
space:
mode:
authorTomasz Figa <t.figa@samsung.com>2014-03-17 23:28:09 +0100
committerKukjin Kim <kgene.kim@samsung.com>2014-03-20 20:04:42 +0100
commit61557b8bac9c80a5c14d237d420c246703e5c2e2 (patch)
tree8d6ea839f96309abd1f453896f8ec7a46af7fdaf /arch/arm/plat-samsung
parentMerge branch 'v3.15-next/cleanup-samsung-2' into v3.15-next/s2r-pm-samsung-2 (diff)
downloadlinux-61557b8bac9c80a5c14d237d420c246703e5c2e2.tar.xz
linux-61557b8bac9c80a5c14d237d420c246703e5c2e2.zip
ARM: EXYNOS: Do not resume l2x0 if not enabled before suspend
Trying to resume l2x0 if it was not enabled before suspend leads to system crash. This patch prevents this by checking if l2x0_regs_phys is a valid pointer to l2x0 context data saved on initialization. Signed-off-by: Tomasz Figa <t.figa@samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/plat-samsung')
-rw-r--r--arch/arm/plat-samsung/s5p-sleep.S8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/plat-samsung/s5p-sleep.S b/arch/arm/plat-samsung/s5p-sleep.S
index a030e7301da8..20764bd5518e 100644
--- a/arch/arm/plat-samsung/s5p-sleep.S
+++ b/arch/arm/plat-samsung/s5p-sleep.S
@@ -59,13 +59,15 @@ ENTRY(s3c_cpu_resume)
and r0, r0, r1
ldr r1, =CPU_CORTEX_A9
cmp r0, r1
- bne resume_l2on
+ bne skip_l2_resume
adr r0, l2x0_regs_phys
ldr r0, [r0]
+ cmp r0, #0
+ beq skip_l2_resume
ldr r1, [r0, #L2X0_R_PHY_BASE]
ldr r2, [r1, #L2X0_CTRL]
tst r2, #0x1
- bne resume_l2on
+ bne skip_l2_resume
ldr r2, [r0, #L2X0_R_AUX_CTRL]
str r2, [r1, #L2X0_AUX_CTRL]
ldr r2, [r0, #L2X0_R_TAG_LATENCY]
@@ -78,7 +80,7 @@ ENTRY(s3c_cpu_resume)
str r2, [r1, #L2X0_POWER_CTRL]
mov r2, #1
str r2, [r1, #L2X0_CTRL]
-resume_l2on:
+skip_l2_resume:
#endif
b cpu_resume
ENDPROC(s3c_cpu_resume)