ar71xx: fix gpio count for ar7241/ar7242
authorFelix Fietkau <nbd@openwrt.org>
Wed, 14 Dec 2011 20:47:24 +0000 (20:47 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 14 Dec 2011 20:47:24 +0000 (20:47 +0000)
SVN-Revision: 29532

target/linux/ar71xx/files/arch/mips/ar71xx/gpio.c
target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h

index 517a136a4342f9a2c4ef3d219afc675464e8439b..eca3b5b76a9f123bb47c12e9e0e7c771e3eb822c 100644 (file)
@@ -254,9 +254,12 @@ void __init ar71xx_gpio_init(void)
                break;
 
        case AR71XX_SOC_AR7240:
+               ar71xx_gpio_chip.ngpio = AR7240_GPIO_COUNT;
+               break;
+
        case AR71XX_SOC_AR7241:
        case AR71XX_SOC_AR7242:
-               ar71xx_gpio_chip.ngpio = AR724X_GPIO_COUNT;
+               ar71xx_gpio_chip.ngpio = AR7241_GPIO_COUNT;
                break;
 
        case AR71XX_SOC_AR9130:
index d9c5e87f3f8364f73f9e62df3bb871264fbc63b5..6ff886134c111e1f2b27b285c235ee24ec21cc54 100644 (file)
@@ -466,7 +466,8 @@ static inline u32 ar71xx_usb_ctrl_rr(unsigned reg)
 #define AR724X_GPIO_FUNC_UART_EN               BIT(1)
 #define AR724X_GPIO_FUNC_JTAG_DISABLE          BIT(0)
 
-#define AR724X_GPIO_COUNT      18
+#define AR7240_GPIO_COUNT      18
+#define AR7241_GPIO_COUNT      20
 
 #define AR91XX_GPIO_FUNC_WMAC_LED_EN   BIT(22)
 #define AR91XX_GPIO_FUNC_EXP_PORT_CS_EN        BIT(21)