20 #include <linux/kernel.h>
26 #include <mach/common.h>
31 #include <asm/cacheflush.h>
33 #define EMEV2_SCU_BASE 0x1e000000
38 static void modify_scu_cpu_psr(
unsigned long set,
unsigned long clr)
45 tmp =
readl(scu_base + 8);
49 spin_unlock(&scu_lock);
53 static unsigned int __init emev2_get_core_count(
void)
65 static int emev2_platform_cpu_kill(
unsigned int cpu)
78 for (k = 0; k < 1000; k++) {
80 return emev2_platform_cpu_kill(cpu);
88 static void __cpuinit emev2_secondary_init(
unsigned int cpu)
98 modify_scu_cpu_psr(0, 3 << (cpu * 8));
107 static void __init emev2_smp_prepare_cpus(
unsigned int max_cpus)
114 modify_scu_cpu_psr(0, 3 << (cpu * 8));
117 static void __init emev2_smp_init_cpus(
void)
119 unsigned int ncores = emev2_get_core_count();
125 .smp_init_cpus = emev2_smp_init_cpus,
126 .smp_prepare_cpus = emev2_smp_prepare_cpus,
127 .smp_secondary_init = emev2_secondary_init,
128 .smp_boot_secondary = emev2_boot_secondary,
129 #ifdef CONFIG_HOTPLUG_CPU
130 .cpu_kill = emev2_cpu_kill,