CPU-Hotplug support for RK3066 and RK3188

-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABCAAGBQJT0NA6AAoJEPOmecmc0R2B+PYH/RD+OYgBNgwSahT13DG2Irky
 EJKJ+BQCIMk0Q+D2Vag/fOiGFeEFpXxeciGu1WkrEyQq2yLpPqzgPEH8NE/XRkkI
 tO/EZY/SERWeL+M5VzybQzvLN9JftSv312yzGc+MMcvOe0kazzFI0O9rQKzBBpxm
 SJKwWZrvDhGOzivOQco+aLYYEcEw7Ai8vfug4Ay75oJ1fQodHiAGhYaJ/+FYbIP/
 aEyVzKoyIAII45Mg6Fg5v+WrfuRaZq76Ch7cxqwLlnuJySVxg62qLzXgLflCTqM7
 NwUFuQHJihBUkeEhAsYiwM23D/1SEKYO2/WWgyiN1nlUNZRxVgqkGYyLnoQQMRs=
 =W1+9
 -----END PGP SIGNATURE-----

Merge tag 'v3.17-rockchip-smp-hotplug' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into next/soc

Merge "CPU-Hotplug support for RK3066 and RK3188" from Heiko Stuebner:

* tag 'v3.17-rockchip-smp-hotplug' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
  ARM: rockchip: Add cpu hotplug support for RK3XXX SoCs
  ARM: rockchip: select ARMv7 compiler flags for platsmp.o

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2014-07-26 17:34:26 +02:00
commit 03eea7cda2
2 changed files with 22 additions and 0 deletions

View File

@ -1,2 +1,4 @@
CFLAGS_platsmp.o := -march=armv7-a
obj-$(CONFIG_ARCH_ROCKCHIP) += rockchip.o
obj-$(CONFIG_SMP) += headsmp.o platsmp.o

View File

@ -21,6 +21,7 @@
#include <linux/of_address.h>
#include <asm/cacheflush.h>
#include <asm/cp15.h>
#include <asm/smp_scu.h>
#include <asm/smp_plat.h>
#include <asm/mach/map.h>
@ -178,8 +179,27 @@ static void __init rockchip_smp_prepare_cpus(unsigned int max_cpus)
pmu_set_power_domain(0 + i, false);
}
#ifdef CONFIG_HOTPLUG_CPU
static int rockchip_cpu_kill(unsigned int cpu)
{
pmu_set_power_domain(0 + cpu, false);
return 1;
}
static void rockchip_cpu_die(unsigned int cpu)
{
v7_exit_coherency_flush(louis);
while(1)
cpu_do_idle();
}
#endif
static struct smp_operations rockchip_smp_ops __initdata = {
.smp_prepare_cpus = rockchip_smp_prepare_cpus,
.smp_boot_secondary = rockchip_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU
.cpu_kill = rockchip_cpu_kill,
.cpu_die = rockchip_cpu_die,
#endif
};
CPU_METHOD_OF_DECLARE(rk3066_smp, "rockchip,rk3066-smp", &rockchip_smp_ops);