diff options
Diffstat (limited to 'arch/arm/mach-ux500/hotplug.c')
-rw-r--r-- | arch/arm/mach-ux500/hotplug.c | 36 |
1 files changed, 8 insertions, 28 deletions
diff --git a/arch/arm/mach-ux500/hotplug.c b/arch/arm/mach-ux500/hotplug.c index c76f0f456f04..2f6af259015d 100644 --- a/arch/arm/mach-ux500/hotplug.c +++ b/arch/arm/mach-ux500/hotplug.c | |||
@@ -15,13 +15,18 @@ | |||
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 | extern volatile int pen_release; | 18 | #include <mach/setup.h> |
19 | 19 | ||
20 | static inline void platform_do_lowpower(unsigned int cpu) | 20 | /* |
21 | * platform-specific code to shutdown a CPU | ||
22 | * | ||
23 | * Called with IRQs disabled | ||
24 | */ | ||
25 | void __ref ux500_cpu_die(unsigned int cpu) | ||
21 | { | 26 | { |
22 | flush_cache_all(); | 27 | flush_cache_all(); |
23 | 28 | ||
24 | /* we put the platform to just WFI */ | 29 | /* directly enter low power state, skipping secure registers */ |
25 | for (;;) { | 30 | for (;;) { |
26 | __asm__ __volatile__("dsb\n\t" "wfi\n\t" | 31 | __asm__ __volatile__("dsb\n\t" "wfi\n\t" |
27 | : : : "memory"); | 32 | : : : "memory"); |
@@ -33,28 +38,3 @@ static inline void platform_do_lowpower(unsigned int cpu) | |||
33 | } | 38 | } |
34 | } | 39 | } |
35 | } | 40 | } |
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 | } | ||