aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/files/include
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2008-12-04 12:17:14 +0000
committerGabor Juhos <juhosg@openwrt.org>2008-12-04 12:17:14 +0000
commit4055fea1aae9e4166535b2823583dec40f9a2527 (patch)
tree4b6466191ff1776aff3e048e2e704b0ebcc5fbfb /target/linux/ar71xx/files/include
parentfbe5c883a094da580230677830488678e9cc03ce (diff)
downloadupstream-4055fea1aae9e4166535b2823583dec40f9a2527.tar.gz
upstream-4055fea1aae9e4166535b2823583dec40f9a2527.tar.bz2
upstream-4055fea1aae9e4166535b2823583dec40f9a2527.zip
make all AR913x GPIO lines usable
SVN-Revision: 13509
Diffstat (limited to 'target/linux/ar71xx/files/include')
-rw-r--r--target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h1
-rw-r--r--target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h5
2 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h
index 78cf1ca244..5e551a14fd 100644
--- a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h
+++ b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/ar71xx.h
@@ -206,6 +206,7 @@ extern void ar71xx_add_device_usb(void) __init;
#define GPIO_FUNC_USB_CLK_EN BIT(0)
#define AR71XX_GPIO_COUNT 16
+#define AR91XX_GPIO_COUNT 22
extern void __iomem *ar71xx_gpio_base;
diff --git a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h
index 347727001b..6354d68cf3 100644
--- a/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h
+++ b/target/linux/ar71xx/files/include/asm-mips/mach-ar71xx/gpio.h
@@ -18,6 +18,7 @@
#include <asm/mach-ar71xx/ar71xx.h>
+extern unsigned long ar71xx_gpio_count;
extern void __ar71xx_gpio_set_value(unsigned gpio, int value);
extern int __ar71xx_gpio_get_value(unsigned gpio);
@@ -33,7 +34,7 @@ static inline int irq_to_gpio(unsigned irq)
static inline int gpio_get_value(unsigned gpio)
{
- if (gpio < AR71XX_GPIO_COUNT)
+ if (gpio < ar71xx_gpio_count)
return __ar71xx_gpio_get_value(gpio);
return __gpio_get_value(gpio);
@@ -41,7 +42,7 @@ static inline int gpio_get_value(unsigned gpio)
static inline void gpio_set_value(unsigned gpio, int value)
{
- if (gpio < AR71XX_GPIO_COUNT)
+ if (gpio < ar71xx_gpio_count)
__ar71xx_gpio_set_value(gpio, value);
else
__gpio_set_value(gpio, value);