]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-realview/platsmp.c
Pull trivial into test branch
[linux-2.6-omap-h63xx.git] / arch / arm / mach-realview / platsmp.c
index 9844644d0fb5c69400c76588ca4d24ed19d550f8..b8484e15dacb7f3e8f3d69ca09ea58334ea47b42 100644 (file)
@@ -17,8 +17,7 @@
 #include <asm/cacheflush.h>
 #include <asm/hardware/arm_scu.h>
 #include <asm/hardware.h>
-
-#include "core.h"
+#include <asm/io.h>
 
 extern void realview_secondary_startup(void);
 
@@ -32,7 +31,7 @@ static unsigned int __init get_core_count(void)
 {
        unsigned int ncores;
 
-       ncores = __raw_readl(IO_ADDRESS(REALVIEW_MPCORE_SCU_BASE) + SCU_CONFIG);
+       ncores = __raw_readl(__io_address(REALVIEW_MPCORE_SCU_BASE) + SCU_CONFIG);
 
        return (ncores & 0x03) + 1;
 }
@@ -133,17 +132,29 @@ static void __init poke_milo(void)
 #if 1
 #define REALVIEW_SYS_FLAGSS_OFFSET 0x30
        __raw_writel(virt_to_phys(realview_secondary_startup),
-                    (IO_ADDRESS(REALVIEW_SYS_BASE) +
-                     REALVIEW_SYS_FLAGSS_OFFSET));
+                    __io_address(REALVIEW_SYS_BASE) +
+                    REALVIEW_SYS_FLAGSS_OFFSET);
 #define REALVIEW_SYS_FLAGSC_OFFSET 0x34
        __raw_writel(3,
-                    (IO_ADDRESS(REALVIEW_SYS_BASE) +
-                     REALVIEW_SYS_FLAGSC_OFFSET));
+                    __io_address(REALVIEW_SYS_BASE) +
+                    REALVIEW_SYS_FLAGSC_OFFSET);
 #endif
 
        mb();
 }
 
+/*
+ * Initialise the CPU possible map early - this describes the CPUs
+ * which may be present or become present in the system.
+ */
+void __init smp_init_cpus(void)
+{
+       unsigned int i, ncores = get_core_count();
+
+       for (i = 0; i < ncores; i++)
+               cpu_set(i, cpu_possible_map);
+}
+
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
        unsigned int ncores = get_core_count();
@@ -175,14 +186,16 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
                max_cpus = ncores;
 
        /*
-        * Initialise the possible/present maps.
-        * cpu_possible_map describes the set of CPUs which may be present
-        * cpu_present_map describes the set of CPUs populated
+        * Enable the local timer for primary CPU
         */
-       for (i = 0; i < max_cpus; i++) {
-               cpu_set(i, cpu_possible_map);
+       local_timer_setup(cpu);
+
+       /*
+        * Initialise the present map, which describes the set of CPUs
+        * actually populated at the present time.
+        */
+       for (i = 0; i < max_cpus; i++)
                cpu_set(i, cpu_present_map);
-       }
 
        /*
         * Do we need any more CPUs? If so, then let them know where