From 4787094b89c63bea289fd79634c52d3946d4b4cb Mon Sep 17 00:00:00 2001 From: lhh Date: Thu, 28 Oct 2010 11:46:30 +0800 Subject: [PATCH] update rk29 gpio --- arch/arm/mach-rk29/gpio.c | 56 +--- arch/arm/mach-rk29/include/mach/gpio.h | 436 ++++++++++++------------- arch/arm/mach-rk29/include/mach/irqs.h | 3 +- 3 files changed, 234 insertions(+), 261 deletions(-) diff --git a/arch/arm/mach-rk29/gpio.c b/arch/arm/mach-rk29/gpio.c index fd40ceb9a918..3135b6d19077 100644 --- a/arch/arm/mach-rk29/gpio.c +++ b/arch/arm/mach-rk29/gpio.c @@ -68,34 +68,13 @@ static int rk29_gpiolib_to_irq(struct gpio_chip *chip,unsigned offset); } static struct rk29_gpio_chip rk29gpio_chip[] = { - RK29_GPIO_CHIP("GPIO0A", PIN_BASE + 0*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO0B", PIN_BASE + 1*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO0C", PIN_BASE + 2*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO0D", PIN_BASE + 3*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO1A", PIN_BASE + 4*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO1B", PIN_BASE + 5*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO1C", PIN_BASE + 6*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO1D", PIN_BASE + 7*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO2A", PIN_BASE + 8*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO2B", PIN_BASE + 9*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO2C", PIN_BASE + 10*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO2D", PIN_BASE + 11*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO3A", PIN_BASE + 12*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO3B", PIN_BASE + 13*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO3C", PIN_BASE + 14*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO3D", PIN_BASE + 15*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO4A", PIN_BASE + 16*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO4B", PIN_BASE + 17*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO4C", PIN_BASE + 18*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO4D", PIN_BASE + 19*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO5A", PIN_BASE + 20*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO5B", PIN_BASE + 21*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO5C", PIN_BASE + 22*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO5D", PIN_BASE + 23*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO6A", PIN_BASE + 24*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO6B", PIN_BASE + 25*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO6C", PIN_BASE + 26*NUM_GROUP, NUM_GROUP), - RK29_GPIO_CHIP("GPIO6D", PIN_BASE + 27*NUM_GROUP, NUM_GROUP), + RK29_GPIO_CHIP("GPIO0ABCD", PIN_BASE + 0*NUM_GROUP, NUM_GROUP), + RK29_GPIO_CHIP("GPIO1ABCD", PIN_BASE + 1*NUM_GROUP, NUM_GROUP), + RK29_GPIO_CHIP("GPIO2ABCD", PIN_BASE + 2*NUM_GROUP, NUM_GROUP), + RK29_GPIO_CHIP("GPIO3ABCD", PIN_BASE + 3*NUM_GROUP, NUM_GROUP), + RK29_GPIO_CHIP("GPIO4ABCD", PIN_BASE + 4*NUM_GROUP, NUM_GROUP), + RK29_GPIO_CHIP("GPIO5ABCD", PIN_BASE + 5*NUM_GROUP, NUM_GROUP), + RK29_GPIO_CHIP("GPIO6ABCD", PIN_BASE + 6*NUM_GROUP, NUM_GROUP), }; static inline void rk29_gpio_write(unsigned char __iomem *regbase, unsigned int regOff,unsigned int val) @@ -133,7 +112,7 @@ static inline struct gpio_chip *pin_to_gpioChip(unsigned pin) pin -= PIN_BASE; pin /= NUM_GROUP; - if (likely(pin < (MAX_BANK*4))) + if (likely(pin < MAX_BANK)) return &(rk29gpio_chip[pin].chip); return NULL; } @@ -143,12 +122,12 @@ static inline unsigned pin_to_mask(unsigned pin) if(pin < PIN_BASE) return 0; pin -= PIN_BASE; - return 1ul << (pin % (NUM_GROUP*4)); + return 1ul << (pin % NUM_GROUP); } static inline unsigned offset_to_mask(unsigned offset) { - return 1ul << (offset % (NUM_GROUP*4)); + return 1ul << (offset % NUM_GROUP); } static int GPIOSetPinLevel(struct gpio_chip *chip, unsigned int mask,eGPIOPinLevel_t level) @@ -249,7 +228,7 @@ static int GPIOSetIntrType(struct gpio_chip *chip, unsigned int mask, eGPIOIntTy static int gpio_irq_set_wake(unsigned irq, unsigned state) { unsigned int pin = irq_to_gpio(irq); - unsigned bank = (pin - PIN_BASE) / (NUM_GROUP*4); + unsigned bank = (pin - PIN_BASE) / NUM_GROUP; unsigned int irq_number; if (unlikely(bank >= MAX_BANK)) @@ -587,18 +566,13 @@ void __init rk29_gpio_irq_setup(void) struct rk29_gpio_chip *this; this = rk29gpio_chip; - pin = NR_IRQS; - + pin = NR_AIC_IRQS; for(i=0;iregbase,GPIO_INTEN,0); for (j = 0; j < 32; j++) { lockdep_set_class(&irq_desc[pin+j].lock, &gpio_lock_class); - /* - * Can use the "simple" and not "edge" handler since it's - * shorter, and the AIC handles interrupts sanely. - */ set_irq_chip(pin+j, &rk29gpio_irqchip); set_irq_handler(pin+j, handle_simple_irq); set_irq_flags(pin+j, IRQF_VALID); @@ -628,13 +602,11 @@ void __init rk29_gpio_irq_setup(void) irq = IRQ_GPIO6; break; } - - set_irq_chip_data(irq, this); set_irq_chained_handler(irq, gpio_irq_handler); - this += 4; + this += 1; pin += 32; } - printk("rk2818_gpio_irq_setup: %d gpio irqs in 7 banks\n", pin - PIN_BASE); + printk("rk29_gpio_irq_setup: %d gpio irqs in 7 banks\n", pin - PIN_BASE); } void __init rk29_gpio_init(struct rk29_gpio_bank *data, int nr_banks) diff --git a/arch/arm/mach-rk29/include/mach/gpio.h b/arch/arm/mach-rk29/include/mach/gpio.h index 93a28a5220fd..ebcc601e8298 100644 --- a/arch/arm/mach-rk29/include/mach/gpio.h +++ b/arch/arm/mach-rk29/include/mach/gpio.h @@ -56,7 +56,7 @@ typedef enum GPIOIntType { #define RK29_ID_GPIO5 5 #define RK29_ID_GPIO6 6 -#define NUM_GROUP 8 +#define NUM_GROUP 32 #define PIN_BASE 0 #define MAX_BANK 7 @@ -68,230 +68,230 @@ typedef enum GPIOIntType { #define RK29_PIN0_PA5 (0*NUM_GROUP + PIN_BASE + 5); #define RK29_PIN0_PA6 (0*NUM_GROUP + PIN_BASE + 6); #define RK29_PIN0_PA7 (0*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN0_PB0 (1*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN0_PB1 (1*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN0_PB2 (1*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN0_PB3 (1*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN0_PB4 (1*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN0_PB5 (1*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN0_PB6 (1*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN0_PB7 (1*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN0_PC0 (2*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN0_PC1 (2*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN0_PC2 (2*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN0_PC3 (2*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN0_PC4 (2*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN0_PC5 (2*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN0_PC6 (2*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN0_PC7 (2*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN0_PD0 (3*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN0_PD1 (3*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN0_PD2 (3*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN0_PD3 (3*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN0_PD4 (3*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN0_PD5 (3*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN0_PD6 (3*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN0_PD7 (3*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN0_PB0 (0*NUM_GROUP + PIN_BASE + 8); +#define RK29_PIN0_PB1 (0*NUM_GROUP + PIN_BASE + 9); +#define RK29_PIN0_PB2 (0*NUM_GROUP + PIN_BASE + 10); +#define RK29_PIN0_PB3 (0*NUM_GROUP + PIN_BASE + 11); +#define RK29_PIN0_PB4 (0*NUM_GROUP + PIN_BASE + 12); +#define RK29_PIN0_PB5 (0*NUM_GROUP + PIN_BASE + 13); +#define RK29_PIN0_PB6 (0*NUM_GROUP + PIN_BASE + 14); +#define RK29_PIN0_PB7 (0*NUM_GROUP + PIN_BASE + 15); +#define RK29_PIN0_PC0 (0*NUM_GROUP + PIN_BASE + 16); +#define RK29_PIN0_PC1 (0*NUM_GROUP + PIN_BASE + 17); +#define RK29_PIN0_PC2 (0*NUM_GROUP + PIN_BASE + 18); +#define RK29_PIN0_PC3 (0*NUM_GROUP + PIN_BASE + 19); +#define RK29_PIN0_PC4 (0*NUM_GROUP + PIN_BASE + 20); +#define RK29_PIN0_PC5 (0*NUM_GROUP + PIN_BASE + 21); +#define RK29_PIN0_PC6 (0*NUM_GROUP + PIN_BASE + 22); +#define RK29_PIN0_PC7 (0*NUM_GROUP + PIN_BASE + 23); +#define RK29_PIN0_PD0 (0*NUM_GROUP + PIN_BASE + 24); +#define RK29_PIN0_PD1 (0*NUM_GROUP + PIN_BASE + 25); +#define RK29_PIN0_PD2 (0*NUM_GROUP + PIN_BASE + 26); +#define RK29_PIN0_PD3 (0*NUM_GROUP + PIN_BASE + 27); +#define RK29_PIN0_PD4 (0*NUM_GROUP + PIN_BASE + 28); +#define RK29_PIN0_PD5 (0*NUM_GROUP + PIN_BASE + 29); +#define RK29_PIN0_PD6 (0*NUM_GROUP + PIN_BASE + 30); +#define RK29_PIN0_PD7 (0*NUM_GROUP + PIN_BASE + 31); -#define RK29_PIN1_PA0 (4*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN1_PA1 (4*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN1_PA2 (4*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN1_PA3 (4*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN1_PA4 (4*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN1_PA5 (4*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN1_PA6 (4*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN1_PA7 (4*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN1_PB0 (5*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN1_PB1 (5*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN1_PB2 (5*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN1_PB3 (5*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN1_PB4 (5*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN1_PB5 (5*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN1_PB6 (5*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN1_PB7 (5*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN1_PC0 (6*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN1_PC1 (6*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN1_PC2 (6*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN1_PC3 (6*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN1_PC4 (6*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN1_PC5 (6*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN1_PC6 (6*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN1_PC7 (6*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN1_PD0 (7*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN1_PD1 (7*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN1_PD2 (7*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN1_PD3 (7*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN1_PD4 (7*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN1_PD5 (7*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN1_PD6 (7*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN1_PD7 (7*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN1_PA0 (1*NUM_GROUP + PIN_BASE + 0); +#define RK29_PIN1_PA1 (1*NUM_GROUP + PIN_BASE + 1); +#define RK29_PIN1_PA2 (1*NUM_GROUP + PIN_BASE + 2); +#define RK29_PIN1_PA3 (1*NUM_GROUP + PIN_BASE + 3); +#define RK29_PIN1_PA4 (1*NUM_GROUP + PIN_BASE + 4); +#define RK29_PIN1_PA5 (1*NUM_GROUP + PIN_BASE + 5); +#define RK29_PIN1_PA6 (1*NUM_GROUP + PIN_BASE + 6); +#define RK29_PIN1_PA7 (1*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN1_PB0 (1*NUM_GROUP + PIN_BASE + 8); +#define RK29_PIN1_PB1 (1*NUM_GROUP + PIN_BASE + 9); +#define RK29_PIN1_PB2 (1*NUM_GROUP + PIN_BASE + 10); +#define RK29_PIN1_PB3 (1*NUM_GROUP + PIN_BASE + 11); +#define RK29_PIN1_PB4 (1*NUM_GROUP + PIN_BASE + 12); +#define RK29_PIN1_PB5 (1*NUM_GROUP + PIN_BASE + 13); +#define RK29_PIN1_PB6 (1*NUM_GROUP + PIN_BASE + 14); +#define RK29_PIN1_PB7 (1*NUM_GROUP + PIN_BASE + 15); +#define RK29_PIN1_PC0 (1*NUM_GROUP + PIN_BASE + 16); +#define RK29_PIN1_PC1 (1*NUM_GROUP + PIN_BASE + 17); +#define RK29_PIN1_PC2 (1*NUM_GROUP + PIN_BASE + 18); +#define RK29_PIN1_PC3 (1*NUM_GROUP + PIN_BASE + 19); +#define RK29_PIN1_PC4 (1*NUM_GROUP + PIN_BASE + 20); +#define RK29_PIN1_PC5 (1*NUM_GROUP + PIN_BASE + 21); +#define RK29_PIN1_PC6 (1*NUM_GROUP + PIN_BASE + 22); +#define RK29_PIN1_PC7 (1*NUM_GROUP + PIN_BASE + 23); +#define RK29_PIN1_PD0 (1*NUM_GROUP + PIN_BASE + 24); +#define RK29_PIN1_PD1 (1*NUM_GROUP + PIN_BASE + 25); +#define RK29_PIN1_PD2 (1*NUM_GROUP + PIN_BASE + 26); +#define RK29_PIN1_PD3 (1*NUM_GROUP + PIN_BASE + 27); +#define RK29_PIN1_PD4 (1*NUM_GROUP + PIN_BASE + 28); +#define RK29_PIN1_PD5 (1*NUM_GROUP + PIN_BASE + 29); +#define RK29_PIN1_PD6 (1*NUM_GROUP + PIN_BASE + 30); +#define RK29_PIN1_PD7 (1*NUM_GROUP + PIN_BASE + 31); -#define RK29_PIN2_PA0 (8*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN2_PA1 (8*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN2_PA2 (8*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN2_PA3 (8*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN2_PA4 (8*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN2_PA5 (8*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN2_PA6 (8*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN2_PA7 (8*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN2_PB0 (9*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN2_PB1 (9*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN2_PB2 (9*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN2_PB3 (9*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN2_PB4 (9*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN2_PB5 (9*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN2_PB6 (9*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN2_PB7 (9*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN2_PC0 (10*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN2_PC1 (10*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN2_PC2 (10*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN2_PC3 (10*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN2_PC4 (10*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN2_PC5 (10*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN2_PC6 (10*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN2_PC7 (10*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN2_PD0 (11*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN2_PD1 (11*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN2_PD2 (11*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN2_PD3 (11*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN2_PD4 (11*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN2_PD5 (11*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN2_PD6 (11*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN2_PD7 (11*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN2_PA0 (2*NUM_GROUP + PIN_BASE + 0); +#define RK29_PIN2_PA1 (2*NUM_GROUP + PIN_BASE + 1); +#define RK29_PIN2_PA2 (2*NUM_GROUP + PIN_BASE + 2); +#define RK29_PIN2_PA3 (2*NUM_GROUP + PIN_BASE + 3); +#define RK29_PIN2_PA4 (2*NUM_GROUP + PIN_BASE + 4); +#define RK29_PIN2_PA5 (2*NUM_GROUP + PIN_BASE + 5); +#define RK29_PIN2_PA6 (2*NUM_GROUP + PIN_BASE + 6); +#define RK29_PIN2_PA7 (2*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN2_PB0 (2*NUM_GROUP + PIN_BASE + 8); +#define RK29_PIN2_PB1 (2*NUM_GROUP + PIN_BASE + 9); +#define RK29_PIN2_PB2 (2*NUM_GROUP + PIN_BASE + 10); +#define RK29_PIN2_PB3 (2*NUM_GROUP + PIN_BASE + 11); +#define RK29_PIN2_PB4 (2*NUM_GROUP + PIN_BASE + 12); +#define RK29_PIN2_PB5 (2*NUM_GROUP + PIN_BASE + 13); +#define RK29_PIN2_PB6 (2*NUM_GROUP + PIN_BASE + 14); +#define RK29_PIN2_PB7 (2*NUM_GROUP + PIN_BASE + 15); +#define RK29_PIN2_PC0 (2*NUM_GROUP + PIN_BASE + 16); +#define RK29_PIN2_PC1 (2*NUM_GROUP + PIN_BASE + 17); +#define RK29_PIN2_PC2 (2*NUM_GROUP + PIN_BASE + 18); +#define RK29_PIN2_PC3 (2*NUM_GROUP + PIN_BASE + 19); +#define RK29_PIN2_PC4 (2*NUM_GROUP + PIN_BASE + 20); +#define RK29_PIN2_PC5 (2*NUM_GROUP + PIN_BASE + 21); +#define RK29_PIN2_PC6 (2*NUM_GROUP + PIN_BASE + 22); +#define RK29_PIN2_PC7 (2*NUM_GROUP + PIN_BASE + 23); +#define RK29_PIN2_PD0 (2*NUM_GROUP + PIN_BASE + 24); +#define RK29_PIN2_PD1 (2*NUM_GROUP + PIN_BASE + 25); +#define RK29_PIN2_PD2 (2*NUM_GROUP + PIN_BASE + 26); +#define RK29_PIN2_PD3 (2*NUM_GROUP + PIN_BASE + 27); +#define RK29_PIN2_PD4 (2*NUM_GROUP + PIN_BASE + 28); +#define RK29_PIN2_PD5 (2*NUM_GROUP + PIN_BASE + 29); +#define RK29_PIN2_PD6 (2*NUM_GROUP + PIN_BASE + 30); +#define RK29_PIN2_PD7 (2*NUM_GROUP + PIN_BASE + 31); -#define RK29_PIN3_PA0 (12*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN3_PA1 (12*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN3_PA2 (12*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN3_PA3 (12*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN3_PA4 (12*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN3_PA5 (12*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN3_PA6 (12*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN3_PA7 (12*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN3_PB0 (13*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN3_PB1 (13*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN3_PB2 (13*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN3_PB3 (13*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN3_PB4 (13*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN3_PB5 (13*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN3_PB6 (13*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN3_PB7 (13*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN3_PC0 (14*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN3_PC1 (14*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN3_PC2 (14*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN3_PC3 (14*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN3_PC4 (14*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN3_PC5 (14*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN3_PC6 (14*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN3_PC7 (14*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN3_PD0 (15*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN3_PD1 (15*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN3_PD2 (15*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN3_PD3 (15*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN3_PD4 (15*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN3_PD5 (15*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN3_PD6 (15*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN3_PD7 (15*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN3_PA0 (3*NUM_GROUP + PIN_BASE + 0); +#define RK29_PIN3_PA1 (3*NUM_GROUP + PIN_BASE + 1); +#define RK29_PIN3_PA2 (3*NUM_GROUP + PIN_BASE + 2); +#define RK29_PIN3_PA3 (3*NUM_GROUP + PIN_BASE + 3); +#define RK29_PIN3_PA4 (3*NUM_GROUP + PIN_BASE + 4); +#define RK29_PIN3_PA5 (3*NUM_GROUP + PIN_BASE + 5); +#define RK29_PIN3_PA6 (3*NUM_GROUP + PIN_BASE + 6); +#define RK29_PIN3_PA7 (3*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN3_PB0 (3*NUM_GROUP + PIN_BASE + 8); +#define RK29_PIN3_PB1 (3*NUM_GROUP + PIN_BASE + 9); +#define RK29_PIN3_PB2 (3*NUM_GROUP + PIN_BASE + 10); +#define RK29_PIN3_PB3 (3*NUM_GROUP + PIN_BASE + 11); +#define RK29_PIN3_PB4 (3*NUM_GROUP + PIN_BASE + 12); +#define RK29_PIN3_PB5 (3*NUM_GROUP + PIN_BASE + 13); +#define RK29_PIN3_PB6 (3*NUM_GROUP + PIN_BASE + 14); +#define RK29_PIN3_PB7 (3*NUM_GROUP + PIN_BASE + 15); +#define RK29_PIN3_PC0 (3*NUM_GROUP + PIN_BASE + 16); +#define RK29_PIN3_PC1 (3*NUM_GROUP + PIN_BASE + 17); +#define RK29_PIN3_PC2 (3*NUM_GROUP + PIN_BASE + 18); +#define RK29_PIN3_PC3 (3*NUM_GROUP + PIN_BASE + 19); +#define RK29_PIN3_PC4 (3*NUM_GROUP + PIN_BASE + 20); +#define RK29_PIN3_PC5 (3*NUM_GROUP + PIN_BASE + 21); +#define RK29_PIN3_PC6 (3*NUM_GROUP + PIN_BASE + 22); +#define RK29_PIN3_PC7 (3*NUM_GROUP + PIN_BASE + 23); +#define RK29_PIN3_PD0 (3*NUM_GROUP + PIN_BASE + 24); +#define RK29_PIN3_PD1 (3*NUM_GROUP + PIN_BASE + 25); +#define RK29_PIN3_PD2 (3*NUM_GROUP + PIN_BASE + 26); +#define RK29_PIN3_PD3 (3*NUM_GROUP + PIN_BASE + 27); +#define RK29_PIN3_PD4 (3*NUM_GROUP + PIN_BASE + 28); +#define RK29_PIN3_PD5 (3*NUM_GROUP + PIN_BASE + 29); +#define RK29_PIN3_PD6 (3*NUM_GROUP + PIN_BASE + 30); +#define RK29_PIN3_PD7 (3*NUM_GROUP + PIN_BASE + 31); -#define RK29_PIN4_PA0 (16*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN4_PA1 (16*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN4_PA2 (16*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN4_PA3 (16*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN4_PA4 (16*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN4_PA5 (16*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN4_PA6 (16*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN4_PA7 (16*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN4_PB0 (17*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN4_PB1 (17*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN4_PB2 (17*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN4_PB3 (17*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN4_PB4 (17*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN4_PB5 (17*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN4_PB6 (17*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN4_PB7 (17*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN4_PC0 (18*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN4_PC1 (18*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN4_PC2 (18*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN4_PC3 (18*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN4_PC4 (18*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN4_PC5 (18*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN4_PC6 (18*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN4_PC7 (18*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN4_PD0 (19*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN4_PD1 (19*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN4_PD2 (19*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN4_PD3 (19*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN4_PD4 (19*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN4_PD5 (19*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN4_PD6 (19*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN4_PD7 (19*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN4_PA0 (4*NUM_GROUP + PIN_BASE + 0); +#define RK29_PIN4_PA1 (4*NUM_GROUP + PIN_BASE + 1); +#define RK29_PIN4_PA2 (4*NUM_GROUP + PIN_BASE + 2); +#define RK29_PIN4_PA3 (4*NUM_GROUP + PIN_BASE + 3); +#define RK29_PIN4_PA4 (4*NUM_GROUP + PIN_BASE + 4); +#define RK29_PIN4_PA5 (4*NUM_GROUP + PIN_BASE + 5); +#define RK29_PIN4_PA6 (4*NUM_GROUP + PIN_BASE + 6); +#define RK29_PIN4_PA7 (4*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN4_PB0 (4*NUM_GROUP + PIN_BASE + 8); +#define RK29_PIN4_PB1 (4*NUM_GROUP + PIN_BASE + 9); +#define RK29_PIN4_PB2 (4*NUM_GROUP + PIN_BASE + 10); +#define RK29_PIN4_PB3 (4*NUM_GROUP + PIN_BASE + 11); +#define RK29_PIN4_PB4 (4*NUM_GROUP + PIN_BASE + 12); +#define RK29_PIN4_PB5 (4*NUM_GROUP + PIN_BASE + 13); +#define RK29_PIN4_PB6 (4*NUM_GROUP + PIN_BASE + 14); +#define RK29_PIN4_PB7 (4*NUM_GROUP + PIN_BASE + 15); +#define RK29_PIN4_PC0 (4*NUM_GROUP + PIN_BASE + 16); +#define RK29_PIN4_PC1 (4*NUM_GROUP + PIN_BASE + 17); +#define RK29_PIN4_PC2 (4*NUM_GROUP + PIN_BASE + 18); +#define RK29_PIN4_PC3 (4*NUM_GROUP + PIN_BASE + 19); +#define RK29_PIN4_PC4 (4*NUM_GROUP + PIN_BASE + 20); +#define RK29_PIN4_PC5 (4*NUM_GROUP + PIN_BASE + 21); +#define RK29_PIN4_PC6 (4*NUM_GROUP + PIN_BASE + 22); +#define RK29_PIN4_PC7 (4*NUM_GROUP + PIN_BASE + 23); +#define RK29_PIN4_PD0 (4*NUM_GROUP + PIN_BASE + 24); +#define RK29_PIN4_PD1 (4*NUM_GROUP + PIN_BASE + 25); +#define RK29_PIN4_PD2 (4*NUM_GROUP + PIN_BASE + 26); +#define RK29_PIN4_PD3 (4*NUM_GROUP + PIN_BASE + 27); +#define RK29_PIN4_PD4 (4*NUM_GROUP + PIN_BASE + 28); +#define RK29_PIN4_PD5 (4*NUM_GROUP + PIN_BASE + 29); +#define RK29_PIN4_PD6 (4*NUM_GROUP + PIN_BASE + 30); +#define RK29_PIN4_PD7 (4*NUM_GROUP + PIN_BASE + 31); -#define RK29_PIN5_PA0 (20*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN5_PA1 (20*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN5_PA2 (20*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN5_PA3 (20*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN5_PA4 (20*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN5_PA5 (20*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN5_PA6 (20*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN5_PA7 (20*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN5_PB0 (21*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN5_PB1 (21*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN5_PB2 (21*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN5_PB3 (21*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN5_PB4 (21*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN5_PB5 (21*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN5_PB6 (21*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN5_PB7 (21*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN5_PC0 (22*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN5_PC1 (22*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN5_PC2 (22*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN5_PC3 (22*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN5_PC4 (22*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN5_PC5 (22*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN5_PC6 (22*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN5_PC7 (22*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN5_PD0 (23*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN5_PD1 (23*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN5_PD2 (23*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN5_PD3 (23*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN5_PD4 (23*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN5_PD5 (23*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN5_PD6 (23*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN5_PD7 (23*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN5_PA0 (5*NUM_GROUP + PIN_BASE + 0); +#define RK29_PIN5_PA1 (5*NUM_GROUP + PIN_BASE + 1); +#define RK29_PIN5_PA2 (5*NUM_GROUP + PIN_BASE + 2); +#define RK29_PIN5_PA3 (5*NUM_GROUP + PIN_BASE + 3); +#define RK29_PIN5_PA4 (5*NUM_GROUP + PIN_BASE + 4); +#define RK29_PIN5_PA5 (5*NUM_GROUP + PIN_BASE + 5); +#define RK29_PIN5_PA6 (5*NUM_GROUP + PIN_BASE + 6); +#define RK29_PIN5_PA7 (5*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN5_PB0 (5*NUM_GROUP + PIN_BASE + 8); +#define RK29_PIN5_PB1 (5*NUM_GROUP + PIN_BASE + 9); +#define RK29_PIN5_PB2 (5*NUM_GROUP + PIN_BASE + 10); +#define RK29_PIN5_PB3 (5*NUM_GROUP + PIN_BASE + 11); +#define RK29_PIN5_PB4 (5*NUM_GROUP + PIN_BASE + 12); +#define RK29_PIN5_PB5 (5*NUM_GROUP + PIN_BASE + 13); +#define RK29_PIN5_PB6 (5*NUM_GROUP + PIN_BASE + 14); +#define RK29_PIN5_PB7 (5*NUM_GROUP + PIN_BASE + 15); +#define RK29_PIN5_PC0 (5*NUM_GROUP + PIN_BASE + 16); +#define RK29_PIN5_PC1 (5*NUM_GROUP + PIN_BASE + 17); +#define RK29_PIN5_PC2 (5*NUM_GROUP + PIN_BASE + 18); +#define RK29_PIN5_PC3 (5*NUM_GROUP + PIN_BASE + 19); +#define RK29_PIN5_PC4 (5*NUM_GROUP + PIN_BASE + 20); +#define RK29_PIN5_PC5 (5*NUM_GROUP + PIN_BASE + 21); +#define RK29_PIN5_PC6 (5*NUM_GROUP + PIN_BASE + 22); +#define RK29_PIN5_PC7 (5*NUM_GROUP + PIN_BASE + 23); +#define RK29_PIN5_PD0 (5*NUM_GROUP + PIN_BASE + 24); +#define RK29_PIN5_PD1 (5*NUM_GROUP + PIN_BASE + 25); +#define RK29_PIN5_PD2 (5*NUM_GROUP + PIN_BASE + 26); +#define RK29_PIN5_PD3 (5*NUM_GROUP + PIN_BASE + 27); +#define RK29_PIN5_PD4 (5*NUM_GROUP + PIN_BASE + 28); +#define RK29_PIN5_PD5 (5*NUM_GROUP + PIN_BASE + 29); +#define RK29_PIN5_PD6 (5*NUM_GROUP + PIN_BASE + 30); +#define RK29_PIN5_PD7 (5*NUM_GROUP + PIN_BASE + 31); -#define RK29_PIN6_PA0 (24*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN6_PA1 (24*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN6_PA2 (24*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN6_PA3 (24*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN6_PA4 (24*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN6_PA5 (24*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN6_PA6 (24*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN6_PA7 (24*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN6_PB0 (25*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN6_PB1 (25*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN6_PB2 (25*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN6_PB3 (25*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN6_PB4 (25*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN6_PB5 (25*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN6_PB6 (25*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN6_PB7 (25*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN6_PC0 (26*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN6_PC1 (26*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN6_PC2 (26*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN6_PC3 (26*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN6_PC4 (26*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN6_PC5 (26*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN6_PC6 (26*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN6_PC7 (26*NUM_GROUP + PIN_BASE + 7); -#define RK29_PIN6_PD0 (27*NUM_GROUP + PIN_BASE + 0); -#define RK29_PIN6_PD1 (27*NUM_GROUP + PIN_BASE + 1); -#define RK29_PIN6_PD2 (27*NUM_GROUP + PIN_BASE + 2); -#define RK29_PIN6_PD3 (27*NUM_GROUP + PIN_BASE + 3); -#define RK29_PIN6_PD4 (27*NUM_GROUP + PIN_BASE + 4); -#define RK29_PIN6_PD5 (27*NUM_GROUP + PIN_BASE + 5); -#define RK29_PIN6_PD6 (27*NUM_GROUP + PIN_BASE + 6); -#define RK29_PIN6_PD7 (27*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN6_PA0 (6*NUM_GROUP + PIN_BASE + 0); +#define RK29_PIN6_PA1 (6*NUM_GROUP + PIN_BASE + 1); +#define RK29_PIN6_PA2 (6*NUM_GROUP + PIN_BASE + 2); +#define RK29_PIN6_PA3 (6*NUM_GROUP + PIN_BASE + 3); +#define RK29_PIN6_PA4 (6*NUM_GROUP + PIN_BASE + 4); +#define RK29_PIN6_PA5 (6*NUM_GROUP + PIN_BASE + 5); +#define RK29_PIN6_PA6 (6*NUM_GROUP + PIN_BASE + 6); +#define RK29_PIN6_PA7 (6*NUM_GROUP + PIN_BASE + 7); +#define RK29_PIN6_PB0 (6*NUM_GROUP + PIN_BASE + 8); +#define RK29_PIN6_PB1 (6*NUM_GROUP + PIN_BASE + 9); +#define RK29_PIN6_PB2 (6*NUM_GROUP + PIN_BASE + 10); +#define RK29_PIN6_PB3 (6*NUM_GROUP + PIN_BASE + 11); +#define RK29_PIN6_PB4 (6*NUM_GROUP + PIN_BASE + 12); +#define RK29_PIN6_PB5 (6*NUM_GROUP + PIN_BASE + 13); +#define RK29_PIN6_PB6 (6*NUM_GROUP + PIN_BASE + 14); +#define RK29_PIN6_PB7 (6*NUM_GROUP + PIN_BASE + 15); +#define RK29_PIN6_PC0 (6*NUM_GROUP + PIN_BASE + 16); +#define RK29_PIN6_PC1 (6*NUM_GROUP + PIN_BASE + 17); +#define RK29_PIN6_PC2 (6*NUM_GROUP + PIN_BASE + 18); +#define RK29_PIN6_PC3 (6*NUM_GROUP + PIN_BASE + 19); +#define RK29_PIN6_PC4 (6*NUM_GROUP + PIN_BASE + 20); +#define RK29_PIN6_PC5 (6*NUM_GROUP + PIN_BASE + 21); +#define RK29_PIN6_PC6 (6*NUM_GROUP + PIN_BASE + 22); +#define RK29_PIN6_PC7 (6*NUM_GROUP + PIN_BASE + 23); +#define RK29_PIN6_PD0 (6*NUM_GROUP + PIN_BASE + 24); +#define RK29_PIN6_PD1 (6*NUM_GROUP + PIN_BASE + 25); +#define RK29_PIN6_PD2 (6*NUM_GROUP + PIN_BASE + 26); +#define RK29_PIN6_PD3 (6*NUM_GROUP + PIN_BASE + 27); +#define RK29_PIN6_PD4 (6*NUM_GROUP + PIN_BASE + 28); +#define RK29_PIN6_PD5 (6*NUM_GROUP + PIN_BASE + 29); +#define RK29_PIN6_PD6 (6*NUM_GROUP + PIN_BASE + 30); +#define RK29_PIN6_PD7 (6*NUM_GROUP + PIN_BASE + 31); -#define ARCH_NR_GPIOS (NUM_GROUP*MAX_BANK*4) +#define ARCH_NR_GPIOS (NUM_GROUP*MAX_BANK) struct rk29_gpio_bank { unsigned short id; diff --git a/arch/arm/mach-rk29/include/mach/irqs.h b/arch/arm/mach-rk29/include/mach/irqs.h index b456d1752338..73810bf57473 100644 --- a/arch/arm/mach-rk29/include/mach/irqs.h +++ b/arch/arm/mach-rk29/include/mach/irqs.h @@ -98,5 +98,6 @@ #define IRQ_A8IRQ2 RK29XX_IRQ(66) #define IRQ_A8IRQ3 RK29XX_IRQ(67) -#define NR_IRQS (IRQ_A8IRQ3+1) +#define NR_AIC_IRQS (IRQ_A8IRQ3+1) +#define NR_IRQS (NR_AIC_IRQS + 7*32) #endif -- 2.34.1