Merge tag 'for-3.8' of git://openrisc.net/~jonas/linux
[deliverable/linux.git] / arch / mips / bcm47xx / wgt634u.c
index e9f9ec8d443b5b959ef4b164b0a46197cad7ebb9..9d111e8087ecff0c7740b9179db2ecdeacd4047c 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/leds.h>
 #include <linux/mtd/physmap.h>
 #include <linux/ssb/ssb.h>
+#include <linux/ssb/ssb_embedded.h>
 #include <linux/interrupt.h>
 #include <linux/reboot.h>
 #include <linux/gpio.h>
@@ -116,7 +117,8 @@ static irqreturn_t gpio_interrupt(int irq, void *ignored)
 
        /* Interrupt are level triggered, revert the interrupt polarity
           to clear the interrupt. */
-       gpio_polarity(WGT634U_GPIO_RESET, state);
+       ssb_gpio_polarity(&bcm47xx_bus.ssb, 1 << WGT634U_GPIO_RESET,
+                         state ? 1 << WGT634U_GPIO_RESET : 0);
 
        if (!state) {
                printk(KERN_INFO "Reset button pressed");
@@ -150,16 +152,18 @@ static int __init wgt634u_init(void)
                                 gpio_interrupt, IRQF_SHARED,
                                 "WGT634U GPIO", &bcm47xx_bus.ssb.chipco)) {
                        gpio_direction_input(WGT634U_GPIO_RESET);
-                       gpio_intmask(WGT634U_GPIO_RESET, 1);
+                       ssb_gpio_intmask(&bcm47xx_bus.ssb,
+                                        1 << WGT634U_GPIO_RESET,
+                                        1 << WGT634U_GPIO_RESET);
                        ssb_chipco_irq_mask(&bcm47xx_bus.ssb.chipco,
                                            SSB_CHIPCO_IRQ_GPIO,
                                            SSB_CHIPCO_IRQ_GPIO);
                }
 
-               wgt634u_flash_data.width = mcore->flash_buswidth;
-               wgt634u_flash_resource.start = mcore->flash_window;
-               wgt634u_flash_resource.end = mcore->flash_window
-                                          + mcore->flash_window_size
+               wgt634u_flash_data.width = mcore->pflash.buswidth;
+               wgt634u_flash_resource.start = mcore->pflash.window;
+               wgt634u_flash_resource.end = mcore->pflash.window
+                                          + mcore->pflash.window_size
                                           - 1;
                return platform_add_devices(wgt634u_devices,
                                            ARRAY_SIZE(wgt634u_devices));
This page took 0.024015 seconds and 5 git commands to generate.