diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2011-09-08 08:15:22 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-09-14 05:14:58 -0400 |
commit | 5ac21a943e4052ef6743b09b6a06fbb683a3519d (patch) | |
tree | e47d3289d14ebe936ecf720137f0a70b6258b7d7 /arch/arm/mach-ux500/hotplug.c | |
parent | 44ea349f5b7e0b4865de9ca6b4437c746eede40c (diff) |
ARM: SoC: convert ux500 to SMP operations
Convert ux500 platforms to use struct smp_operations to provide
their SMP and CPU hotplug operations.
Cc: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-ux500/hotplug.c')
-rw-r--r-- | arch/arm/mach-ux500/hotplug.c | 36 |
1 files changed, 9 insertions, 27 deletions
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c index c76f0f456f04..b8e4d9ed62d8 100644 --- a/arch/arm/mach-ux500/hotplug.c +++ b/arch/arm/mach-ux500/hotplug.c | |||
@@ -15,13 +15,20 @@ | |||
15 | #include <asm/cacheflush.h> | 15 | #include <asm/cacheflush.h> |
16 | #include <asm/smp_plat.h> | 16 | #include <asm/smp_plat.h> |
17 | 17 | ||
18 | #include <mach/setup.h> | ||
19 | |||
18 | extern volatile int pen_release; | 20 | extern volatile int pen_release; |
19 | 21 | ||
20 | static inline void platform_do_lowpower(unsigned int cpu) | 22 | /* |
23 | * platform-specific code to shutdown a CPU | ||
24 | * | ||
25 | * Called with IRQs disabled | ||
26 | */ | ||
27 | void __ref ux500_cpu_die(unsigned int cpu) | ||
21 | { | 28 | { |
22 | flush_cache_all(); | 29 | flush_cache_all(); |
23 | 30 | ||
24 | /* we put the platform to just WFI */ | 31 | /* directly enter low power state, skipping secure registers */ |
25 | for (;;) { | 32 | for (;;) { |
26 | __asm__ __volatile__("dsb\n\t" "wfi\n\t" | 33 | __asm__ __volatile__("dsb\n\t" "wfi\n\t" |
27 | : : : "memory"); | 34 | : : : "memory"); |
@@ -33,28 +40,3 @@ static inline void platform_do_lowpower(unsigned int cpu) | |||
33 | } | 40 | } |
34 | } | 41 | } |
35 | } | 42 | } |
36 | |||
37 | int platform_cpu_kill(unsigned int cpu) | ||
38 | { | ||
39 | return 1; | ||
40 | } | ||
41 | |||
42 | /* | ||
43 | * platform-specific code to shutdown a CPU | ||
44 | * | ||
45 | * Called with IRQs disabled | ||
46 | */ | ||
47 | void platform_cpu_die(unsigned int cpu) | ||
48 | { | ||
49 | /* directly enter low power state, skipping secure registers */ | ||
50 | platform_do_lowpower(cpu); | ||
51 | } | ||
52 | |||
53 | int platform_cpu_disable(unsigned int cpu) | ||
54 | { | ||
55 | /* | ||
56 | * we don't allow CPU 0 to be shutdown (it is still too special | ||
57 | * e.g. clock tick interrupts) | ||
58 | */ | ||
59 | return cpu == 0 ? -EPERM : 0; | ||
60 | } | ||