diff options
Diffstat (limited to 'arch/arm/mach-exynos')
-rw-r--r-- | arch/arm/mach-exynos/common.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-exynos/cpuidle.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-exynos/hotplug.c | 45 | ||||
-rw-r--r-- | arch/arm/mach-exynos/pm.c | 7 |
4 files changed, 53 insertions, 4 deletions
diff --git a/arch/arm/mach-exynos/common.c b/arch/arm/mach-exynos/common.c index 3f257e76bfde..ddd4b72c6f9a 100644 --- a/arch/arm/mach-exynos/common.c +++ b/arch/arm/mach-exynos/common.c | |||
@@ -680,6 +680,8 @@ void __init exynos5_init_irq(void) | |||
680 | * uses GIC instead of VIC. | 680 | * uses GIC instead of VIC. |
681 | */ | 681 | */ |
682 | s5p_init_irq(NULL, 0); | 682 | s5p_init_irq(NULL, 0); |
683 | |||
684 | gic_arch_extn.irq_set_wake = s3c_irq_wake; | ||
683 | } | 685 | } |
684 | 686 | ||
685 | struct bus_type exynos_subsys = { | 687 | struct bus_type exynos_subsys = { |
diff --git a/arch/arm/mach-exynos/cpuidle.c b/arch/arm/mach-exynos/cpuidle.c index cff0595d0d35..8e4ec21ef2cf 100644 --- a/arch/arm/mach-exynos/cpuidle.c +++ b/arch/arm/mach-exynos/cpuidle.c | |||
@@ -116,7 +116,8 @@ static int exynos4_enter_core0_aftr(struct cpuidle_device *dev, | |||
116 | cpu_suspend(0, idle_finisher); | 116 | cpu_suspend(0, idle_finisher); |
117 | 117 | ||
118 | #ifdef CONFIG_SMP | 118 | #ifdef CONFIG_SMP |
119 | scu_enable(S5P_VA_SCU); | 119 | if (!soc_is_exynos5250()) |
120 | scu_enable(S5P_VA_SCU); | ||
120 | #endif | 121 | #endif |
121 | cpu_pm_exit(); | 122 | cpu_pm_exit(); |
122 | 123 | ||
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c index f4d7dd20cdac..c3f825b27947 100644 --- a/arch/arm/mach-exynos/hotplug.c +++ b/arch/arm/mach-exynos/hotplug.c | |||
@@ -20,10 +20,11 @@ | |||
20 | #include <asm/smp_plat.h> | 20 | #include <asm/smp_plat.h> |
21 | 21 | ||
22 | #include <mach/regs-pmu.h> | 22 | #include <mach/regs-pmu.h> |
23 | #include <plat/cpu.h> | ||
23 | 24 | ||
24 | #include "common.h" | 25 | #include "common.h" |
25 | 26 | ||
26 | static inline void cpu_enter_lowpower(void) | 27 | static inline void cpu_enter_lowpower_a9(void) |
27 | { | 28 | { |
28 | unsigned int v; | 29 | unsigned int v; |
29 | 30 | ||
@@ -45,6 +46,35 @@ static inline void cpu_enter_lowpower(void) | |||
45 | : "cc"); | 46 | : "cc"); |
46 | } | 47 | } |
47 | 48 | ||
49 | static inline void cpu_enter_lowpower_a15(void) | ||
50 | { | ||
51 | unsigned int v; | ||
52 | |||
53 | asm volatile( | ||
54 | " mrc p15, 0, %0, c1, c0, 0\n" | ||
55 | " bic %0, %0, %1\n" | ||
56 | " mcr p15, 0, %0, c1, c0, 0\n" | ||
57 | : "=&r" (v) | ||
58 | : "Ir" (CR_C) | ||
59 | : "cc"); | ||
60 | |||
61 | flush_cache_louis(); | ||
62 | |||
63 | asm volatile( | ||
64 | /* | ||
65 | * Turn off coherency | ||
66 | */ | ||
67 | " mrc p15, 0, %0, c1, c0, 1\n" | ||
68 | " bic %0, %0, %1\n" | ||
69 | " mcr p15, 0, %0, c1, c0, 1\n" | ||
70 | : "=&r" (v) | ||
71 | : "Ir" (0x40) | ||
72 | : "cc"); | ||
73 | |||
74 | isb(); | ||
75 | dsb(); | ||
76 | } | ||
77 | |||
48 | static inline void cpu_leave_lowpower(void) | 78 | static inline void cpu_leave_lowpower(void) |
49 | { | 79 | { |
50 | unsigned int v; | 80 | unsigned int v; |
@@ -103,11 +133,20 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious) | |||
103 | void __ref exynos_cpu_die(unsigned int cpu) | 133 | void __ref exynos_cpu_die(unsigned int cpu) |
104 | { | 134 | { |
105 | int spurious = 0; | 135 | int spurious = 0; |
136 | int primary_part = 0; | ||
106 | 137 | ||
107 | /* | 138 | /* |
108 | * we're ready for shutdown now, so do it | 139 | * we're ready for shutdown now, so do it. |
140 | * Exynos4 is A9 based while Exynos5 is A15; check the CPU part | ||
141 | * number by reading the Main ID register and then perform the | ||
142 | * appropriate sequence for entering low power. | ||
109 | */ | 143 | */ |
110 | cpu_enter_lowpower(); | 144 | asm("mrc p15, 0, %0, c0, c0, 0" : "=r"(primary_part) : : "cc"); |
145 | if ((primary_part & 0xfff0) == 0xc0f0) | ||
146 | cpu_enter_lowpower_a15(); | ||
147 | else | ||
148 | cpu_enter_lowpower_a9(); | ||
149 | |||
111 | platform_do_lowpower(cpu, &spurious); | 150 | platform_do_lowpower(cpu, &spurious); |
112 | 151 | ||
113 | /* | 152 | /* |
diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index c06c992943a1..8df6ec547f78 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c | |||
@@ -81,6 +81,9 @@ static int exynos_cpu_suspend(unsigned long arg) | |||
81 | outer_flush_all(); | 81 | outer_flush_all(); |
82 | #endif | 82 | #endif |
83 | 83 | ||
84 | if (soc_is_exynos5250()) | ||
85 | flush_cache_all(); | ||
86 | |||
84 | /* issue the standby signal into the pm unit. */ | 87 | /* issue the standby signal into the pm unit. */ |
85 | cpu_do_idle(); | 88 | cpu_do_idle(); |
86 | 89 | ||
@@ -312,6 +315,10 @@ static void exynos_pm_resume(void) | |||
312 | } | 315 | } |
313 | 316 | ||
314 | early_wakeup: | 317 | early_wakeup: |
318 | |||
319 | /* Clear SLEEP mode set in INFORM1 */ | ||
320 | __raw_writel(0x0, S5P_INFORM1); | ||
321 | |||
315 | return; | 322 | return; |
316 | } | 323 | } |
317 | 324 | ||