]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/maple/setup.c
Merge branch 'master' of hera.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / maple / setup.c
index 50855d4fd5a08204d1cfcabdc4bc98ada2005fd6..144177d77cf1075bf590afb8492141d932f59200 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/initrd.h>
 #include <linux/vt_kern.h>
 #include <linux/console.h>
-#include <linux/ide.h>
 #include <linux/pci.h>
 #include <linux/adb.h>
 #include <linux/cuda.h>
 #include <linux/root_dev.h>
 #include <linux/serial.h>
 #include <linux/smp.h>
+#include <linux/bitops.h>
 
 #include <asm/processor.h>
 #include <asm/sections.h>
 #include <asm/prom.h>
 #include <asm/system.h>
 #include <asm/pgtable.h>
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/kexec.h>
 #include <asm/pci-bridge.h>
@@ -62,6 +61,7 @@
 #include <asm/mpic.h>
 #include <asm/rtas.h>
 #include <asm/udbg.h>
+#include <asm/nvram.h>
 
 #include "maple.h"
 
@@ -113,8 +113,8 @@ static void maple_restart(char *cmd)
                printk(KERN_EMERG "Maple: Unable to find Service Processor\n");
                goto fail;
        }
-       maple_nvram_offset = get_property(sp, "restart-addr", NULL);
-       maple_nvram_command = get_property(sp, "restart-value", NULL);
+       maple_nvram_offset = of_get_property(sp, "restart-addr", NULL);
+       maple_nvram_command = of_get_property(sp, "restart-value", NULL);
        of_node_put(sp);
 
        /* send command */
@@ -140,8 +140,8 @@ static void maple_power_off(void)
                printk(KERN_EMERG "Maple: Unable to find Service Processor\n");
                goto fail;
        }
-       maple_nvram_offset = get_property(sp, "power-off-addr", NULL);
-       maple_nvram_command = get_property(sp, "power-off-value", NULL);
+       maple_nvram_offset = of_get_property(sp, "power-off-addr", NULL);
+       maple_nvram_command = of_get_property(sp, "power-off-value", NULL);
        of_node_put(sp);
 
        /* send command */
@@ -195,6 +195,8 @@ void __init maple_setup_arch(void)
        maple_use_rtas_reboot_and_halt_if_present();
 
        printk(KERN_DEBUG "Using native/NAP idle loop\n");
+
+       mmio_nvram_init();
 }
 
 /* 
@@ -229,7 +231,7 @@ static void __init maple_init_IRQ(void)
         */
 
        for_each_node_by_type(np, "interrupt-controller")
-               if (device_is_compatible(np, "open-pic")) {
+               if (of_device_is_compatible(np, "open-pic")) {
                        mpic_node = np;
                        break;
                }
@@ -246,8 +248,8 @@ static void __init maple_init_IRQ(void)
 
        /* Find address list in /platform-open-pic */
        root = of_find_node_by_path("/");
-       naddr = prom_n_addr_cells(root);
-       opprop = get_property(root, "platform-open-pic", &opplen);
+       naddr = of_n_addr_cells(root);
+       opprop = of_get_property(root, "platform-open-pic", &opplen);
        if (opprop != 0) {
                openpic_addr = of_read_number(opprop, naddr);
                has_isus = (opplen > naddr);
@@ -258,11 +260,11 @@ static void __init maple_init_IRQ(void)
        BUG_ON(openpic_addr == 0);
 
        /* Check for a big endian MPIC */
-       if (get_property(np, "big-endian", NULL) != NULL)
+       if (of_get_property(np, "big-endian", NULL) != NULL)
                flags |= MPIC_BIG_ENDIAN;
 
        /* XXX Maple specific bits */
-       flags |= MPIC_BROKEN_U3 | MPIC_WANTS_RESET;
+       flags |= MPIC_U3_HT_IRQS | MPIC_WANTS_RESET;
        /* All U3/U4 are big-endian, older SLOF firmware doesn't encode this */
        flags |= MPIC_BIG_ENDIAN;