rk3188: support more cpus
author黄涛 <huangtao@rock-chips.com>
Wed, 16 Jan 2013 08:05:47 +0000 (16:05 +0800)
committer黄涛 <huangtao@rock-chips.com>
Wed, 16 Jan 2013 08:05:47 +0000 (16:05 +0800)
arch/arm/mach-rk30/hotplug.c
arch/arm/mach-rk30/platsmp.c
arch/arm/mach-rk3188/Makefile

index 159269149cb4bed7c8107a204ce3f232b9d01d74..355d0382a3c799fbb3d9ac0c5956566996dbff7a 100644 (file)
@@ -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;
                }
 
index 6c3ff7a051df17773dcab9327a46d91773426aa0..5f0a2db30a59fa816bd410a0145752622cd13f99 100755 (executable)
@@ -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;
 }
index a7b1f822dd413036f6ec4136c32c3a11965e0e6b..ec0e8a84534c8ba21d06d8766db4e0839c627507 100644 (file)
@@ -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