ARM: SAMSUNG: check processor type before cache restoration in resume
authorInderpal Singh <inderpal.singh@linaro.org>
Thu, 4 Apr 2013 07:01:15 +0000 (16:01 +0900)
committerKukjin Kim <kgene.kim@samsung.com>
Thu, 4 Apr 2013 07:01:20 +0000 (16:01 +0900)
Only cortex-a9 based samsung platforms have l2x0 cache controller. Hence check
the same before restoring the cache in resume.

This is needed for single kernel image.

Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/plat-samsung/s5p-sleep.S

index bdf6dadf87906f2e6933abcb1443740dd53785e4..a030e7301da86a3654fb16cb0f9412280e192594 100644 (file)
@@ -25,6 +25,9 @@
 #include <asm/asm-offsets.h>
 #include <asm/hardware/cache-l2x0.h>
 
+#define CPU_MASK       0xff0ffff0
+#define CPU_CORTEX_A9  0x410fc090
+
 /*
  *      The following code is located into the .data section. This is to
  *      allow l2x0_regs_phys to be accessed with a relative load while we
 
 ENTRY(s3c_cpu_resume)
 #ifdef CONFIG_CACHE_L2X0
+       mrc     p15, 0, r0, c0, c0, 0
+       ldr     r1, =CPU_MASK
+       and     r0, r0, r1
+       ldr     r1, =CPU_CORTEX_A9
+       cmp     r0, r1
+       bne     resume_l2on
        adr     r0, l2x0_regs_phys
        ldr     r0, [r0]
        ldr     r1, [r0, #L2X0_R_PHY_BASE]
This page took 0.027981 seconds and 5 git commands to generate.