Merge branch 'master' of /home/sam/kernel/linux-2.6/
[pandora-kernel.git] / arch / powerpc / platforms / maple / setup.c
index ec5c1e1..5cf90c2 100644 (file)
@@ -13,7 +13,6 @@
 
 #define DEBUG
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
@@ -189,7 +188,7 @@ void __init maple_setup_arch(void)
        conswitchp = &dummy_con;
 #endif
 
-       printk(KERN_INFO "Using native/NAP idle loop\n");
+       printk(KERN_DEBUG "Using native/NAP idle loop\n");
 }
 
 /* 
@@ -199,11 +198,6 @@ static void __init maple_init_early(void)
 {
        DBG(" -> maple_init_early\n");
 
-       /* Initialize hash table, from now on, we can take hash faults
-        * and call ioremap
-        */
-       hpte_init_native();
-
        /* Setup interrupt mapping options */
        ppc64_interrupt_controller = IC_OPEN_PIC;
 
@@ -259,9 +253,10 @@ static void __init maple_progress(char *s, unsigned short hex)
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
-static int __init maple_probe(int platform)
+static int __init maple_probe(void)
 {
-       if (platform != PLATFORM_MAPLE)
+       unsigned long root = of_get_flat_dt_root();
+       if (!of_flat_dt_is_compatible(root, "Momentum,Maple"))
                return 0;
        /*
         * On U3, the DART (iommu) must be allocated now since it
@@ -271,10 +266,13 @@ static int __init maple_probe(int platform)
         */
        alloc_dart_table();
 
+       hpte_init_native();
+
        return 1;
 }
 
-struct machdep_calls __initdata maple_md = {
+define_machine(maple_md) {
+       .name                   = "Maple",
        .probe                  = maple_probe,
        .setup_arch             = maple_setup_arch,
        .init_early             = maple_init_early,
@@ -290,7 +288,7 @@ struct machdep_calls __initdata maple_md = {
                .get_rtc_time           = maple_get_rtc_time,
        .calibrate_decr         = generic_calibrate_decr,
        .progress               = maple_progress,
-       .idle_loop              = native_idle,
+       .power_save             = power4_idle,
 #ifdef CONFIG_KEXEC
        .machine_kexec          = default_machine_kexec,
        .machine_kexec_prepare  = default_machine_kexec_prepare,