diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-12-04 12:17:14 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-12-04 12:17:14 +0000 |
commit | 4055fea1aae9e4166535b2823583dec40f9a2527 (patch) | |
tree | 4b6466191ff1776aff3e048e2e704b0ebcc5fbfb /target/linux/ar71xx/files/arch/mips | |
parent | fbe5c883a094da580230677830488678e9cc03ce (diff) | |
download | master-31e0f0ae-4055fea1aae9e4166535b2823583dec40f9a2527.tar.gz master-31e0f0ae-4055fea1aae9e4166535b2823583dec40f9a2527.tar.bz2 master-31e0f0ae-4055fea1aae9e4166535b2823583dec40f9a2527.zip |
make all AR913x GPIO lines usable
SVN-Revision: 13509
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c b/target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c index 03bf38b7c0..a3d00aeedd 100644 --- a/target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c +++ b/target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c @@ -22,6 +22,9 @@ static DEFINE_SPINLOCK(ar71xx_gpio_lock); +unsigned long ar71xx_gpio_count; +EXPORT_SYMBOL(ar71xx_gpio_count); + void __ar71xx_gpio_set_value(unsigned gpio, int value) { unsigned long flags; @@ -129,6 +132,22 @@ void __init ar71xx_gpio_init(void) "AR71xx GPIO controller")) panic("cannot allocate AR71xx GPIO registers page"); + switch (ar71xx_soc) { + case AR71XX_SOC_AR7130: + case AR71XX_SOC_AR7141: + case AR71XX_SOC_AR7161: + ar71xx_gpio_chip.ngpio = AR71XX_GPIO_COUNT; + break; + + case AR71XX_SOC_AR9130: + case AR71XX_SOC_AR9132: + ar71xx_gpio_chip.ngpio = AR91XX_GPIO_COUNT; + break; + + default: + BUG(); + } + err = gpiochip_add(&ar71xx_gpio_chip); if (err) panic("cannot add AR71xx GPIO chip, error=%d", err); |