12 #include <linux/errno.h>
14 #include <linux/device.h>
20 #include <asm/cacheflush.h>
21 #include <asm/cputype.h>
28 #define VDD_SC1_ARRAY_CLAMP_GFS_CTL 0x15A0
29 #define SCSS_CPU1CORE_RESET 0xD80
30 #define SCSS_DBG_STATUS_CORE_PWRDUP 0xE64
36 static inline int get_core_count(
void)
39 return ((read_cpuid_id() >> 4) & 3) + 1;
42 static void __cpuinit msm_secondary_init(
unsigned int cpu)
61 spin_lock(&boot_lock);
62 spin_unlock(&boot_lock);
87 static int cold_boot_done;
90 if (cold_boot_done ==
false) {
91 prepare_cold_cpu(cpu);
92 cold_boot_done =
true;
99 spin_lock(&boot_lock);
133 spin_unlock(&boot_lock);
144 static void __init msm_smp_init_cpus(
void)
146 unsigned int i, ncores = get_core_count();
148 if (ncores > nr_cpu_ids) {
149 pr_warn(
"SMP: %u cores greater than maximum (%u), clipping\n",
154 for (i = 0; i < ncores; i++)
160 static void __init msm_smp_prepare_cpus(
unsigned int max_cpus)
165 .smp_init_cpus = msm_smp_init_cpus,
166 .smp_prepare_cpus = msm_smp_prepare_cpus,
167 .smp_secondary_init = msm_secondary_init,
168 .smp_boot_secondary = msm_boot_secondary,
169 #ifdef CONFIG_HOTPLUG_CPU