aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-rockchip/platsmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-rockchip/platsmp.c')
-rw-r--r--arch/arm/mach-rockchip/platsmp.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/arm/mach-rockchip/platsmp.c b/arch/arm/mach-rockchip/platsmp.c
index 910835d4ccf4..189684f55927 100644
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -21,6 +21,7 @@
21#include <linux/of_address.h> 21#include <linux/of_address.h>
22 22
23#include <asm/cacheflush.h> 23#include <asm/cacheflush.h>
24#include <asm/cp15.h>
24#include <asm/smp_scu.h> 25#include <asm/smp_scu.h>
25#include <asm/smp_plat.h> 26#include <asm/smp_plat.h>
26#include <asm/mach/map.h> 27#include <asm/mach/map.h>
@@ -178,8 +179,27 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
178 pmu_set_power_domain(0 + i, false); 179 pmu_set_power_domain(0 + i, false);
179} 180}
180 181
182#ifdef CONFIG_HOTPLUG_CPU
183static int rockchip_cpu_kill(unsigned int cpu)
184{
185 pmu_set_power_domain(0 + cpu, false);
186 return 1;
187}
188
189static void rockchip_cpu_die(unsigned int cpu)
190{
191 v7_exit_coherency_flush(louis);
192 while(1)
193 cpu_do_idle();
194}
195#endif
196
181static struct smp_operations rockchip_smp_ops __initdata = { 197static struct smp_operations rockchip_smp_ops __initdata = {
182 .smp_prepare_cpus = rockchip_smp_prepare_cpus, 198 .smp_prepare_cpus = rockchip_smp_prepare_cpus,
183 .smp_boot_secondary = rockchip_boot_secondary, 199 .smp_boot_secondary = rockchip_boot_secondary,
200#ifdef CONFIG_HOTPLUG_CPU
201 .cpu_kill = rockchip_cpu_kill,
202 .cpu_die = rockchip_cpu_die,
203#endif
184}; 204};
185CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp", &rockchip_smp_ops); 205CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp", &rockchip_smp_ops);