brcm47xx: fix patch which moves the flash struct in wgt634u code
[openwrt.git] / target / linux / brcm47xx / patches-3.3 / 812-disable_wgt634u_crap.patch
index 76419e823c17e02e034f09079bbfd29558e135b5..e675c5309e7794945c3436e4633d772664fd5e82 100644 (file)
@@ -7,7 +7,7 @@
 -obj-$(CONFIG_BCM47XX_SSB)     += wgt634u.o
 --- a/arch/mips/bcm47xx/wgt634u.c
 +++ /dev/null
-@@ -1,170 +0,0 @@
+@@ -1,177 +0,0 @@
 -/*
 - * This file is subject to the terms and conditions of the GNU General Public
 - * License.  See the file "COPYING" in the main directory of this archive
 -       * been allocated ranges 00:09:5b:xx:xx:xx and 00:0f:b5:xx:xx:xx.
 -       */
 -      u8 *et0mac;
+-      int err;
 -
 -      if (bcm47xx_bus_type != BCM47XX_BUS_TYPE_SSB)
 -              return -ENODEV;
 -      if (et0mac[0] == 0x00 &&
 -          ((et0mac[1] == 0x09 && et0mac[2] == 0x5b) ||
 -           (et0mac[1] == 0x0f && et0mac[2] == 0xb5))) {
--              struct ssb_mipscore *mcore = &bcm47xx_bus.ssb.mipscore;
+-              struct ssb_chipcommon *ccore = &bcm47xx_bus.ssb.chipco;
 -
 -              printk(KERN_INFO "WGT634U machine detected.\n");
 -
+-              err = gpio_request(WGT634U_GPIO_RESET, "reset-buton");
+-              if (err) {
+-                      printk(KERN_INFO "Can not register gpio fir reset button\n");
+-                      return 0;
+-              }
+-
 -              if (!request_irq(gpio_to_irq(WGT634U_GPIO_RESET),
 -                               gpio_interrupt, IRQF_SHARED,
--                               "WGT634U GPIO", &bcm47xx_bus.ssb.chipco)) {
+-                               "WGT634U GPIO", ccore)) {
 -                      gpio_direction_input(WGT634U_GPIO_RESET);
 -                      gpio_intmask(WGT634U_GPIO_RESET, 1);
--                      ssb_chipco_irq_mask(&bcm47xx_bus.ssb.chipco,
+-                      ssb_chipco_irq_mask(ccore,
 -                                          SSB_CHIPCO_IRQ_GPIO,
 -                                          SSB_CHIPCO_IRQ_GPIO);
 -              }
 -
--              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
+-              wgt634u_flash_data.width = ccore->pflash.buswidth;
+-              wgt634u_flash_resource.start = ccore->pflash.window;
+-              wgt634u_flash_resource.end = ccore->pflash.window
+-                                         + ccore->pflash.window_size
 -                                         - 1;
 -              return platform_add_devices(wgt634u_devices,
 -                                          ARRAY_SIZE(wgt634u_devices));