summaryrefslogtreecommitdiffstats
path: root/target/linux/brcm63xx/files/include
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-06-04 10:01:03 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-06-04 10:01:03 +0000
commit848fab305c87ffd38ba84ab99de4b8797413477e (patch)
tree4428f716e457fc1b4db15975aa237b41b81e3a87 /target/linux/brcm63xx/files/include
parentf1fc76fbaa626d87c5a42d1ca3d7272e52a0a4a1 (diff)
[brcm63xx] use the correct number of GPIOs for bcm6358
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16329 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/files/include')
-rw-r--r--target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_gpio.h12
-rw-r--r--target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/gpio.h2
2 files changed, 10 insertions, 4 deletions
diff --git a/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_gpio.h b/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_gpio.h
index 7f5d8e87d..76a0b7216 100644
--- a/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_gpio.h
+++ b/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/bcm63xx_gpio.h
@@ -5,8 +5,16 @@
int __init bcm63xx_gpio_init(void);
-/* all helpers will BUG() if gpio count is >= 37. */
-#define BCM63XX_GPIO_COUNT 37
+static inline unsigned long bcm63xx_gpio_count(void)
+{
+ switch (bcm63xx_get_cpu_id()) {
+ case BCM6358_CPU_ID:
+ return 40;
+ case BCM6348_CPU_ID:
+ default:
+ return 37;
+ }
+}
#define GPIO_DIR_OUT 0x0
#define GPIO_DIR_IN 0x1
diff --git a/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/gpio.h b/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/gpio.h
index 033c997af..7cda8c0a3 100644
--- a/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/gpio.h
+++ b/target/linux/brcm63xx/files/include/asm-mips/mach-bcm63xx/gpio.h
@@ -3,8 +3,6 @@
#include <bcm63xx_gpio.h>
-#define NR_BUILTIN_GPIO BCM63XX_GPIO_COUNT
-
#define gpio_to_irq(gpio) NULL
#define gpio_get_value __gpio_get_value