aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/hotplug.c
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2014-05-31 00:44:32 -0400
committerOlof Johansson <olof@lixom.net>2014-05-31 00:44:49 -0400
commitfe388fac0f18010688032393d042807261791eaf (patch)
treea8893162201072ead0fb353063216b918335fa60 /arch/arm/mach-exynos/hotplug.c
parent8792f59213c3fc39a7f407f27975cce38fbb1b6d (diff)
parent9dfa92ec4033c348aae6bafc1881e07229fabaa6 (diff)
Merge tag 'samsung-exynos' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/soc
Samsung Exynos updates for 3.16 - add new SoCs support : exynos3250, 5260, 5410 and 5800 - enable multi-platform on exynos : consolidate exynos related Kconfig entries * tag 'samsung-exynos' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: (22 commits) ARM: EXYNOS: Enable multi-platform build support ARM: EXYNOS: Consolidate Kconfig entries ARM: EXYNOS: Add support for EXYNOS5410 SoC ARM: EXYNOS: Support secondary CPU boot of Exynos3250 ARM: EXYNOS: Add Exynos3250 SoC ID ARM: EXYNOS: Add 5800 SoC support ARM: EXYNOS: initial board support for exynos5260 SoC cpufreq: exynos: Fix the compile error ARM: S3C24XX: move debug-macro.S into the common space ARM: S3C24XX: use generic DEBUG_UART_PHY/_VIRT in debug macro ARM: S3C24XX: trim down debug uart handling ARM: compressed/head.S: remove s3c24xx special case ARM: EXYNOS: Remove unnecessary inclusion of cpu.h ARM: EXYNOS: Migrate Exynos specific macros from plat to mach ARM: EXYNOS: Remove exynos_subsys registration ARM: EXYNOS: Remove duplicate lines in Makefile ARM: EXYNOS: use v7_exit_coherency_flush macro for cache disabling ARM: dts: Remove g2d_pd node for exynos5420 ARM: dts: Remove mau_pd node for exynos5420 ARM: exynos_defconfig: enable HS-I2C to fix for mmc partition mount ... Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-exynos/hotplug.c')
-rw-r--r--arch/arm/mach-exynos/hotplug.c65
1 files changed, 1 insertions, 64 deletions
diff --git a/arch/arm/mach-exynos/hotplug.c b/arch/arm/mach-exynos/hotplug.c
index 609c99ca59c4..69fa48397394 100644
--- a/arch/arm/mach-exynos/hotplug.c
+++ b/arch/arm/mach-exynos/hotplug.c
@@ -19,61 +19,9 @@
19#include <asm/cp15.h> 19#include <asm/cp15.h>
20#include <asm/smp_plat.h> 20#include <asm/smp_plat.h>
21 21
22#include <plat/cpu.h>
23
24#include "common.h" 22#include "common.h"
25#include "regs-pmu.h" 23#include "regs-pmu.h"
26 24
27static inline void cpu_enter_lowpower_a9(void)
28{
29 unsigned int v;
30
31 asm volatile(
32 " mcr p15, 0, %1, c7, c5, 0\n"
33 " mcr p15, 0, %1, c7, c10, 4\n"
34 /*
35 * Turn off coherency
36 */
37 " mrc p15, 0, %0, c1, c0, 1\n"
38 " bic %0, %0, %3\n"
39 " mcr p15, 0, %0, c1, c0, 1\n"
40 " mrc p15, 0, %0, c1, c0, 0\n"
41 " bic %0, %0, %2\n"
42 " mcr p15, 0, %0, c1, c0, 0\n"
43 : "=&r" (v)
44 : "r" (0), "Ir" (CR_C), "Ir" (0x40)
45 : "cc");
46}
47
48static inline void cpu_enter_lowpower_a15(void)
49{
50 unsigned int v;
51
52 asm volatile(
53 " mrc p15, 0, %0, c1, c0, 0\n"
54 " bic %0, %0, %1\n"
55 " mcr p15, 0, %0, c1, c0, 0\n"
56 : "=&r" (v)
57 : "Ir" (CR_C)
58 : "cc");
59
60 flush_cache_louis();
61
62 asm volatile(
63 /*
64 * Turn off coherency
65 */
66 " mrc p15, 0, %0, c1, c0, 1\n"
67 " bic %0, %0, %1\n"
68 " mcr p15, 0, %0, c1, c0, 1\n"
69 : "=&r" (v)
70 : "Ir" (0x40)
71 : "cc");
72
73 isb();
74 dsb();
75}
76
77static inline void cpu_leave_lowpower(void) 25static inline void cpu_leave_lowpower(void)
78{ 26{
79 unsigned int v; 27 unsigned int v;
@@ -132,19 +80,8 @@ static inline void platform_do_lowpower(unsigned int cpu, int *spurious)
132void __ref exynos_cpu_die(unsigned int cpu) 80void __ref exynos_cpu_die(unsigned int cpu)
133{ 81{
134 int spurious = 0; 82 int spurious = 0;
135 int primary_part = 0;
136 83
137 /* 84 v7_exit_coherency_flush(louis);
138 * we're ready for shutdown now, so do it.
139 * Exynos4 is A9 based while Exynos5 is A15; check the CPU part
140 * number by reading the Main ID register and then perform the
141 * appropriate sequence for entering low power.
142 */
143 asm("mrc p15, 0, %0, c0, c0, 0" : "=r"(primary_part) : : "cc");
144 if ((primary_part & 0xfff0) == 0xc0f0)
145 cpu_enter_lowpower_a15();
146 else
147 cpu_enter_lowpower_a9();
148 85
149 platform_do_lowpower(cpu, &spurious); 86 platform_do_lowpower(cpu, &spurious);
150 87