diff options
author | Soren Brinkmann <soren.brinkmann@xilinx.com> | 2014-09-02 17:19:13 -0400 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2014-09-16 06:55:10 -0400 |
commit | caf86a73eab4132f870e883216850d9eee40b04b (patch) | |
tree | eef994b37bfb32e88251724d6ee8f1cc9d49369e /arch/arm/mach-zynq | |
parent | 50c7960a4517d6c93226351cd8c43c86f104c919 (diff) |
ARM: zynq: Remove hotplug.c
The hotplug code contains only a single function, which is an SMP
function. Move that to platsmp.c where all other SMP runctions reside.
That allows removing hotplug.c and declaring the cpu_die function
static.
Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Diffstat (limited to 'arch/arm/mach-zynq')
-rw-r--r-- | arch/arm/mach-zynq/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-zynq/common.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-zynq/hotplug.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-zynq/platsmp.c | 18 |
4 files changed, 18 insertions, 21 deletions
diff --git a/arch/arm/mach-zynq/Makefile b/arch/arm/mach-zynq/Makefile index 820dff6e1eba..c85fb3f7d5cd 100644 --- a/arch/arm/mach-zynq/Makefile +++ b/arch/arm/mach-zynq/Makefile | |||
@@ -6,5 +6,4 @@ | |||
6 | obj-y := common.o slcr.o pm.o | 6 | obj-y := common.o slcr.o pm.o |
7 | CFLAGS_REMOVE_hotplug.o =-march=armv6k | 7 | CFLAGS_REMOVE_hotplug.o =-march=armv6k |
8 | CFLAGS_hotplug.o =-Wa,-march=armv7-a -mcpu=cortex-a9 | 8 | CFLAGS_hotplug.o =-Wa,-march=armv7-a -mcpu=cortex-a9 |
9 | obj-$(CONFIG_HOTPLUG_CPU) += hotplug.o | ||
10 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o | 9 | obj-$(CONFIG_SMP) += headsmp.o platsmp.o |
diff --git a/arch/arm/mach-zynq/common.h b/arch/arm/mach-zynq/common.h index 24d6340d3fb6..2bc71273c73c 100644 --- a/arch/arm/mach-zynq/common.h +++ b/arch/arm/mach-zynq/common.h | |||
@@ -39,9 +39,6 @@ extern struct smp_operations zynq_smp_ops __initdata; | |||
39 | 39 | ||
40 | extern void __iomem *zynq_scu_base; | 40 | extern void __iomem *zynq_scu_base; |
41 | 41 | ||
42 | /* Hotplug */ | ||
43 | extern void zynq_platform_cpu_die(unsigned int cpu); | ||
44 | |||
45 | void zynq_pm_late_init(void); | 42 | void zynq_pm_late_init(void); |
46 | 43 | ||
47 | static inline void zynq_core_pm_init(void) | 44 | static inline void zynq_core_pm_init(void) |
diff --git a/arch/arm/mach-zynq/hotplug.c b/arch/arm/mach-zynq/hotplug.c index fe44a05677e2..b685c89f11e4 100644 --- a/arch/arm/mach-zynq/hotplug.c +++ b/arch/arm/mach-zynq/hotplug.c | |||
@@ -12,20 +12,3 @@ | |||
12 | */ | 12 | */ |
13 | #include <asm/proc-fns.h> | 13 | #include <asm/proc-fns.h> |
14 | 14 | ||
15 | /* | ||
16 | * platform-specific code to shutdown a CPU | ||
17 | * | ||
18 | * Called with IRQs disabled | ||
19 | */ | ||
20 | void zynq_platform_cpu_die(unsigned int cpu) | ||
21 | { | ||
22 | zynq_slcr_cpu_state_write(cpu, true); | ||
23 | |||
24 | /* | ||
25 | * there is no power-control hardware on this platform, so all | ||
26 | * we can do is put the core into WFI; this is safe as the calling | ||
27 | * code will have already disabled interrupts | ||
28 | */ | ||
29 | for (;;) | ||
30 | cpu_do_idle(); | ||
31 | } | ||
diff --git a/arch/arm/mach-zynq/platsmp.c b/arch/arm/mach-zynq/platsmp.c index 06415eeba7e6..f722b5a83a45 100644 --- a/arch/arm/mach-zynq/platsmp.c +++ b/arch/arm/mach-zynq/platsmp.c | |||
@@ -136,6 +136,24 @@ static int zynq_cpu_kill(unsigned cpu) | |||
136 | zynq_slcr_cpu_stop(cpu); | 136 | zynq_slcr_cpu_stop(cpu); |
137 | return 1; | 137 | return 1; |
138 | } | 138 | } |
139 | |||
140 | /* | ||
141 | * platform-specific code to shutdown a CPU | ||
142 | * | ||
143 | * Called with IRQs disabled | ||
144 | */ | ||
145 | static void zynq_platform_cpu_die(unsigned int cpu) | ||
146 | { | ||
147 | zynq_slcr_cpu_state_write(cpu, true); | ||
148 | |||
149 | /* | ||
150 | * there is no power-control hardware on this platform, so all | ||
151 | * we can do is put the core into WFI; this is safe as the calling | ||
152 | * code will have already disabled interrupts | ||
153 | */ | ||
154 | for (;;) | ||
155 | cpu_do_idle(); | ||
156 | } | ||
139 | #endif | 157 | #endif |
140 | 158 | ||
141 | struct smp_operations zynq_smp_ops __initdata = { | 159 | struct smp_operations zynq_smp_ops __initdata = { |