ARM: l2c: exynos: convert to common l2c310 early resume functionality
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 5 Apr 2014 10:45:34 +0000 (11:45 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 29 May 2014 23:49:12 +0000 (00:49 +0100)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-exynos/common.h
arch/arm/mach-exynos/exynos.c
arch/arm/mach-exynos/sleep.S
arch/arm/plat-samsung/s5p-sleep.S

index 9ef3f83efaffa642c9bbe26d68aa71750072c28e..88c619d1e1458d22d394de922935016477dda17c 100644 (file)
@@ -55,7 +55,6 @@ enum sys_powerdown {
        NUM_SYS_POWERDOWN,
 };
 
-extern unsigned long l2x0_regs_phys;
 struct exynos_pmu_conf {
        void __iomem *reg;
        unsigned int val[NUM_SYS_POWERDOWN];
index a51bf25e7523533f3e32f6895a4057dcecbd02dd..fbfc29df32993d0517dd3168a5c46bcbd7f1341c 100644 (file)
@@ -318,17 +318,7 @@ core_initcall(exynos_core_init);
 
 static int __init exynos4_l2x0_cache_init(void)
 {
-       int ret;
-
-       ret = l2x0_of_init(0x3c400001, 0xc20fffff);
-       if (ret)
-               return ret;
-
-       if (IS_ENABLED(CONFIG_S5P_SLEEP)) {
-               l2x0_regs_phys = virt_to_phys(&l2x0_saved_regs);
-               clean_dcache_area(&l2x0_regs_phys, sizeof(unsigned long));
-       }
-       return 0;
+       return l2x0_of_init(0x3c400001, 0xc20fffff);
 }
 early_initcall(exynos4_l2x0_cache_init);
 
index 7e0af530511eae35bff4625c7ce1e4746dc84b23..108a45f4bb62077fc718bb9e2f473ddfd5b9533b 100644 (file)
@@ -16,8 +16,6 @@
  */
 
 #include <linux/linkage.h>
-#include <asm/asm-offsets.h>
-#include <asm/hardware/cache-l2x0.h>
 
 #define CPU_MASK       0xff0ffff0
 #define CPU_CORTEX_A9  0x410fc090
@@ -53,33 +51,7 @@ ENTRY(exynos_cpu_resume)
        and     r0, r0, r1
        ldr     r1, =CPU_CORTEX_A9
        cmp     r0, r1
-       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     skip_l2_resume
-       ldr     r2, [r0, #L2X0_R_AUX_CTRL]
-       str     r2, [r1, #L2X0_AUX_CTRL]
-       ldr     r2, [r0, #L2X0_R_TAG_LATENCY]
-       str     r2, [r1, #L310_TAG_LATENCY_CTRL]
-       ldr     r2, [r0, #L2X0_R_DATA_LATENCY]
-       str     r2, [r1, #L310_DATA_LATENCY_CTRL]
-       ldr     r2, [r0, #L2X0_R_PREFETCH_CTRL]
-       str     r2, [r1, #L310_PREFETCH_CTRL]
-       ldr     r2, [r0, #L2X0_R_PWR_CTRL]
-       str     r2, [r1, #L310_POWER_CTRL]
-       mov     r2, #1
-       str     r2, [r1, #L2X0_CTRL]
-skip_l2_resume:
+       bleq    l2c310_early_resume
 #endif
        b       cpu_resume
 ENDPROC(exynos_cpu_resume)
-#ifdef CONFIG_CACHE_L2X0
-       .globl l2x0_regs_phys
-l2x0_regs_phys:
-       .long   0
-#endif
index c5001659bdf8659b92adb6a3d83c4e39ac04f3d1..25c68ceb9e2bfadc9432a4765c1652bd01eb60e3 100644 (file)
@@ -22,7 +22,6 @@
 */
 
 #include <linux/linkage.h>
-#include <asm/asm-offsets.h>
 
        .data
        .align