1 #ifndef __ASM_ARCH_GPIO_H
2 #define __ASM_ARCH_GPIO_H
5 * 288 (#267 is the highest one actually hooked up) onchip GPIOs, plus enough
6 * room for a couple of GPIO expanders.
8 #define ARCH_NR_GPIOS 350
10 #include <plat/gpio.h>
12 #define __GPIO_RESOURCE(soc, block) \
14 .start = soc##_GPIOBANK##block##_BASE, \
15 .end = soc##_GPIOBANK##block##_BASE + 127, \
16 .flags = IORESOURCE_MEM, \
19 .start = IRQ_GPIO##block, \
20 .end = IRQ_GPIO##block, \
21 .flags = IORESOURCE_IRQ, \
24 #define __GPIO_DEVICE(soc, block) \
29 .resource = &soc##_gpio_resources[block * 2], \
31 .platform_data = &soc##_gpio_data[block], \
35 #define GPIO_DATA(_name, first) \
38 .first_gpio = first, \
39 .first_irq = NOMADIK_GPIO_TO_IRQ(first), \
42 #ifdef CONFIG_UX500_SOC_DB8500
43 #define GPIO_RESOURCE(block) __GPIO_RESOURCE(U8500, block)
44 #define GPIO_DEVICE(block) __GPIO_DEVICE(u8500, block)
45 #elif defined(CONFIG_UX500_SOC_DB5500)
46 #define GPIO_RESOURCE(block) __GPIO_RESOURCE(U5500, block)
47 #define GPIO_DEVICE(block) __GPIO_DEVICE(u5500, block)
50 #endif /* __ASM_ARCH_GPIO_H */