Recent changes to the brcm47xx gpio implementation result in an IRQ
no longer being assigned to the gpio driver.  This breaks the ability
to enter failsafe, and possibly other things.

Only tested on a BCMA device (SSB not tested).

Signed-off-by: Nathan Hintz <nlhi...@hotmail.com>

Index: target/linux/brcm47xx/patches-3.6/400-arch-bcm47xx.patch
===================================================================
--- target/linux/brcm47xx/patches-3.6/400-arch-bcm47xx.patch    (revision 35248)
+++ target/linux/brcm47xx/patches-3.6/400-arch-bcm47xx.patch    (working copy)
@@ -41,7 +41,7 @@
  obj-$(CONFIG_BCM47XX_SSB)     += wgt634u.o
 --- /dev/null
 +++ b/arch/mips/bcm47xx/gpio.c
-@@ -0,0 +1,119 @@
+@@ -0,0 +1,140 @@
 +/*
 + * 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
@@ -161,9 +161,38 @@
 +      return -EINVAL;
 +}
 +EXPORT_SYMBOL(bcm47xx_gpio_polarity);
++
++int gpio_to_irq(unsigned gpio)
++{
++      switch (bcm47xx_bus_type) {
++#ifdef CONFIG_BCM47XX_SSB
++      case BCM47XX_BUS_TYPE_SSB:
++              if (ssb_chipco_available(&bcm47xx_bus.ssb.chipco))
++                      return ssb_mips_irq(bcm47xx_bus.ssb.chipco.dev) + 2;
++              else if (ssb_extif_available(&bcm47xx_bus.ssb.extif))
++                      return ssb_mips_irq(bcm47xx_bus.ssb.extif.dev) + 2;
++              else
++                      return -EINVAL;
++#endif
++#ifdef CONFIG_BCM47XX_BCMA
++      case BCM47XX_BUS_TYPE_BCMA:
++              return bcma_core_irq(bcm47xx_bus.bcma.bus.drv_cc.core);
++#endif
++      }
++      return -EINVAL;
++}
++EXPORT_SYMBOL_GPL(gpio_to_irq);
 --- a/arch/mips/include/asm/mach-bcm47xx/gpio.h
 +++ b/arch/mips/include/asm/mach-bcm47xx/gpio.h
-@@ -14,4 +14,11 @@ static inline int irq_to_gpio(unsigned i
+@@ -7,11 +7,18 @@
+ #define gpio_set_value __gpio_set_value
+ 
+ #define gpio_cansleep __gpio_cansleep
+-#define gpio_to_irq __gpio_to_irq
++extern int gpio_to_irq(unsigned gpio); 
+ 
+ static inline int irq_to_gpio(unsigned int irq)
+ {
        return -EINVAL;
  }
  

_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to