MIPS: BCM47xx: Use the new SSB GPIO API
[pandora-kernel.git] / arch / mips / bcm47xx / setup.c
index 1b6b0fa..2f580fa 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <linux/types.h>
 #include <linux/ssb/ssb.h>
+#include <linux/ssb/ssb_embedded.h>
 #include <asm/bootinfo.h>
 #include <asm/reboot.h>
 #include <asm/time.h>
@@ -41,7 +42,7 @@ static void bcm47xx_machine_restart(char *command)
        printk(KERN_ALERT "Please stand by while rebooting the system...\n");
        local_irq_disable();
        /* Set the watchdog timer to reset immediately */
-       ssb_chipco_watchdog_timer_set(&ssb_bcm47xx.chipco, 1);
+       ssb_watchdog_timer_set(&ssb_bcm47xx, 1);
        while (1)
                cpu_relax();
 }
@@ -50,7 +51,7 @@ static void bcm47xx_machine_halt(void)
 {
        /* Disable interrupts and watchdog and spin forever */
        local_irq_disable();
-       ssb_chipco_watchdog_timer_set(&ssb_bcm47xx.chipco, 0);
+       ssb_watchdog_timer_set(&ssb_bcm47xx, 0);
        while (1)
                cpu_relax();
 }
@@ -92,17 +93,17 @@ static int bcm47xx_get_invariants(struct ssb_bus *bus,
        iv->sprom.revision = 3;
 
        if (cfe_getenv("et0macaddr", buf, sizeof(buf)) >= 0)
-               str2eaddr(buf, iv->sprom.r1.et0mac);
+               str2eaddr(buf, iv->sprom.et0mac);
        if (cfe_getenv("et1macaddr", buf, sizeof(buf)) >= 0)
-               str2eaddr(buf, iv->sprom.r1.et1mac);
+               str2eaddr(buf, iv->sprom.et1mac);
        if (cfe_getenv("et0phyaddr", buf, sizeof(buf)) >= 0)
-               iv->sprom.r1.et0phyaddr = simple_strtoul(buf, NULL, 10);
+               iv->sprom.et0phyaddr = simple_strtoul(buf, NULL, 10);
        if (cfe_getenv("et1phyaddr", buf, sizeof(buf)) >= 0)
-               iv->sprom.r1.et1phyaddr = simple_strtoul(buf, NULL, 10);
+               iv->sprom.et1phyaddr = simple_strtoul(buf, NULL, 10);
        if (cfe_getenv("et0mdcport", buf, sizeof(buf)) >= 0)
-               iv->sprom.r1.et0mdcport = simple_strtoul(buf, NULL, 10);
+               iv->sprom.et0mdcport = simple_strtoul(buf, NULL, 10);
        if (cfe_getenv("et1mdcport", buf, sizeof(buf)) >= 0)
-               iv->sprom.r1.et1mdcport = simple_strtoul(buf, NULL, 10);
+               iv->sprom.et1mdcport = simple_strtoul(buf, NULL, 10);
 
        return 0;
 }