From c3ae7c8de82bf177596e0971fbc4805a7fef4ebc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Sun, 25 Mar 2012 11:39:31 +0800 Subject: [PATCH] rk30: smp: boot_secondary power off cpu1 first --- arch/arm/mach-rk30/platsmp.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rk30/platsmp.c b/arch/arm/mach-rk30/platsmp.c index c727174f658e..144f04d3c9d3 100644 --- a/arch/arm/mach-rk30/platsmp.c +++ b/arch/arm/mach-rk30/platsmp.c @@ -68,16 +68,19 @@ extern void rk30_sram_secondary_startup(void); int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle) { - static bool copied; + static bool first = true; - if (!copied) { + if (first) { unsigned long sz = 0x100; + pmu_set_power_domain(PD_A9_1, false); + memcpy(RK30_IMEM_BASE + sz - 4, (void *)rk30_sram_secondary_startup + sz - 4, 4); memcpy(RK30_IMEM_BASE, rk30_sram_secondary_startup, sz); flush_icache_range((unsigned long)RK30_IMEM_BASE, (unsigned long)RK30_IMEM_BASE + sz); outer_clean_range(0, sz); - copied = true; + + first = false; } dsb_sev(); -- 2.34.1