@@ -7,6 +7,7 @@
#ifndef __ASSEMBLER__
unsigned int scu_get_core_count(void __iomem *);
+void scu_init_cpus(void __iomem *);
void scu_enable(void __iomem *);
int scu_power_mode(void __iomem *, unsigned int);
#endif
@@ -29,6 +29,25 @@ unsigned int __init scu_get_core_count(void __iomem *scu_base)
return (ncores & 0x03) + 1;
}
+void __init scu_init_cpus(void __iomem *scu_base)
+{
+ unsigned int i, ncores;
+
+ ncores = scu_get_core_count(scu_base);
+
+ /* sanity check */
+ if (ncores > NR_CPUS) {
+ printk(KERN_WARNING
+ "SCU: No. of cores (%d) greater than configured "
+ "maximum of %d - clipping\n",
+ ncores, NR_CPUS);
+ ncores = NR_CPUS;
+ }
+
+ for (i = 0; i < ncores; i++)
+ set_cpu_possible(i, true);
+}
+
/*
* Enable the SCU
*/