select BOOT_RAW
select CEVT_R4K
select CSRC_R4K
-@@ -100,7 +101,6 @@ config BCM47XX
- select IRQ_CPU
+@@ -101,7 +102,6 @@ config BCM47XX
+ select NO_EXCEPT_FILL
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_LITTLE_ENDIAN
- select GENERIC_GPIO
Support for BCM47XX based boards
--- a/arch/mips/bcm47xx/gpio.c
+++ b/arch/mips/bcm47xx/gpio.c
-@@ -4,83 +4,150 @@
+@@ -4,83 +4,154 @@
* for more details.
*
* Copyright (C) 2007 Aurelien Jarno <aurelien@aurel32.net>
-#include <asm/mach-bcm47xx/gpio.h>
+#include <linux/ssb/ssb_embedded.h>
+#include <linux/bcma/bcma.h>
-+#include <linux/bcma/bcma_driver_gpio.h>
+
+#include <bcm47xx.h>
-
- if (test_and_set_bit(gpio, gpio_in_use))
- return -EBUSY;
-+ return bcma_gpio_in(&bcm47xx_bus.bcma.bus, mask);
++ return bcma_chipco_gpio_in(&bcm47xx_bus.bcma.bus.drv_cc, mask);
+#endif
+ }
+ return -EINVAL;
+#endif
+#ifdef CONFIG_BCM47XX_BCMA
+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_gpio_out(&bcm47xx_bus.bcma.bus, mask, value);
++ return bcma_chipco_gpio_out(&bcm47xx_bus.bcma.bus.drv_cc, mask,
++ value);
#endif
}
return -EINVAL;
+#endif
+#ifdef CONFIG_BCM47XX_BCMA
+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_gpio_outen(&bcm47xx_bus.bcma.bus, mask, value);
++ return bcma_chipco_gpio_outen(&bcm47xx_bus.bcma.bus.drv_cc,
++ mask, value);
+#endif
+ }
+ return -EINVAL;
+#endif
+#ifdef CONFIG_BCM47XX_BCMA
+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_gpio_control(&bcm47xx_bus.bcma.bus, mask, value);
++ return bcma_chipco_gpio_control(&bcm47xx_bus.bcma.bus.drv_cc,
++ mask, value);
+#endif
+ }
+ return -EINVAL;
case BCM47XX_BUS_TYPE_BCMA:
- if (gpio >= BCM47XX_CHIPCO_GPIO_LINES)
- return;
-+ return bcma_gpio_intmask(&bcm47xx_bus.bcma.bus, mask, value);
++ return bcma_chipco_gpio_intmask(&bcm47xx_bus.bcma.bus.drv_cc,
++ mask, value);
+#endif
+ }
+ return -EINVAL;
+#endif
+#ifdef CONFIG_BCM47XX_BCMA
+ case BCM47XX_BUS_TYPE_BCMA:
-+ return bcma_gpio_polarity(&bcm47xx_bus.bcma.bus, mask, value);
++ return bcma_chipco_gpio_polarity(&bcm47xx_bus.bcma.bus.drv_cc,
++ mask, value);
#endif
}
+ return -EINVAL;
{
switch (bcm47xx_bus_type) {
#ifdef CONFIG_BCM47XX_SSB
-@@ -99,4 +166,55 @@ int gpio_to_irq(unsigned gpio)
+@@ -99,4 +170,55 @@ int gpio_to_irq(unsigned gpio)
}
return -EINVAL;
}
+#endif
+#ifdef CONFIG_BCM47XX_BCMA
+ case BCM47XX_BUS_TYPE_BCMA:
-+ bcm47xx_gpio_count = bcma_gpio_count(&bcm47xx_bus.bcma.bus);
++ bcm47xx_gpio_count = bcma_chipco_gpio_count();
+ break;
+#endif
+ }
+EXPORT_SYMBOL(gpio_set_value);
--- a/arch/mips/bcm47xx/setup.c
+++ b/arch/mips/bcm47xx/setup.c
-@@ -345,6 +345,8 @@ void __init plat_mem_setup(void)
+@@ -252,6 +252,8 @@ void __init plat_mem_setup(void)
_machine_restart = bcm47xx_machine_restart;
_machine_halt = bcm47xx_machine_halt;
pm_power_off = bcm47xx_machine_halt;
+
if (!request_irq(gpio_to_irq(WGT634U_GPIO_RESET),
gpio_interrupt, IRQF_SHARED,
- "WGT634U GPIO", ccore)) {
+ "WGT634U GPIO", &bcm47xx_bus.ssb.chipco)) {
--- a/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
+++ b/arch/mips/include/asm/mach-bcm47xx/bcm47xx.h
@@ -56,4 +56,6 @@ void bcm47xx_fill_bcma_boardinfo(struct