From 4344d7abcbbcf6ffc7507fb408c46d299e747f79 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Wed, 16 Jan 2013 16:05:47 +0800 Subject: [PATCH] rk3188: support more cpus --- arch/arm/mach-rk30/hotplug.c | 2 +- arch/arm/mach-rk30/platsmp.c | 6 ++++-- arch/arm/mach-rk3188/Makefile | 3 +++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rk30/hotplug.c b/arch/arm/mach-rk30/hotplug.c index 159269149cb4..355d0382a3c7 100644 --- a/arch/arm/mach-rk30/hotplug.c +++ b/arch/arm/mach-rk30/hotplug.c @@ -33,7 +33,7 @@ int platform_cpu_kill(unsigned int cpu) */ for (k = 0; k < 1000; k++) { if (cpumask_test_cpu(cpu, &dead_cpus)) { - pmu_set_power_domain(PD_A9_1, false); + pmu_set_power_domain(PD_A9_0 + cpu, false); return 1; } diff --git a/arch/arm/mach-rk30/platsmp.c b/arch/arm/mach-rk30/platsmp.c index 6c3ff7a051df..5f0a2db30a59 100755 --- a/arch/arm/mach-rk30/platsmp.c +++ b/arch/arm/mach-rk30/platsmp.c @@ -77,8 +77,10 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) if (first) { unsigned long sz = 0x10; + unsigned int i, ncores = scu_get_core_count(RK30_SCU_BASE); - pmu_set_power_domain(PD_A9_1, false); + for (i = 1; i < ncores; i++) + pmu_set_power_domain(PD_A9_0 + i, false); memcpy(RK30_IMEM_BASE, rk30_sram_secondary_startup, sz); flush_icache_range((unsigned long)RK30_IMEM_BASE, (unsigned long)RK30_IMEM_BASE + sz); @@ -88,7 +90,7 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) } dsb_sev(); - pmu_set_power_domain(PD_A9_1, true); + pmu_set_power_domain(PD_A9_0 + cpu, true); return 0; } diff --git a/arch/arm/mach-rk3188/Makefile b/arch/arm/mach-rk3188/Makefile index a7b1f822dd41..ec0e8a84534c 100644 --- a/arch/arm/mach-rk3188/Makefile +++ b/arch/arm/mach-rk3188/Makefile @@ -11,6 +11,9 @@ CFLAGS_common.o += -DTEXT_OFFSET=$(TEXT_OFFSET) obj-y += ../mach-rk30/devices.o obj-y += io.o obj-y += rk_timer.o +obj-$(CONFIG_SMP) += ../mach-rk30/platsmp.o ../mach-rk30/headsmp.o +obj-$(CONFIG_HOTPLUG_CPU) += ../mach-rk30/hotplug.o +obj-$(CONFIG_CPU_IDLE) += ../mach-rk30/cpuidle.o obj-$(CONFIG_MACH_RK3188_FPGA) += board-rk3188-fpga.o obj-$(CONFIG_MACH_RK3188_TB) += ../mach-rk30/board-rk3168-tb.o -- 2.34.1