diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2011-09-08 04:04:51 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-09-08 05:03:56 -0400 |
commit | cc890cd78acd7ab03442907d354b6af34e973cb3 (patch) | |
tree | 67cf73ea730969ffc26c3a5c55de8d96bb8b6299 /arch/arm/mach-u300/include/mach/irqs.h | |
parent | 526a0dc771a5cac3224e26abd1f018976b967516 (diff) |
ARM: 7083/1: rewrite U300 GPIO to use gpiolib
This rewrites the U300 GPIO so as to use gpiolib and
struct gpio_chip instead of just generic GPIO, hiding
all the platform specifics and passing in GPIO chip
variant as platform data at runtime instead of the
compiletime kludges.
As a result <mach/gpio.h> is now empty for U300 and
using just defaults.
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Debian kernel maintainers <debian-kernel@lists.debian.org>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-u300/include/mach/irqs.h')
-rw-r--r-- | arch/arm/mach-u300/include/mach/irqs.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/arch/arm/mach-u300/include/mach/irqs.h b/arch/arm/mach-u300/include/mach/irqs.h index 09b1b28fa8fd..d270fea32926 100644 --- a/arch/arm/mach-u300/include/mach/irqs.h +++ b/arch/arm/mach-u300/include/mach/irqs.h | |||
@@ -72,7 +72,7 @@ | |||
72 | 72 | ||
73 | /* DB3150 and DB3200 have only 45 IRQs */ | 73 | /* DB3150 and DB3200 have only 45 IRQs */ |
74 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) | 74 | #if defined(CONFIG_MACH_U300_BS2X) || defined(CONFIG_MACH_U300_BS330) |
75 | #define U300_NR_IRQS 45 | 75 | #define U300_VIC_IRQS_END 45 |
76 | #endif | 76 | #endif |
77 | 77 | ||
78 | /* The DB3350-specific interrupt lines */ | 78 | /* The DB3350-specific interrupt lines */ |
@@ -88,7 +88,7 @@ | |||
88 | #define IRQ_U300_GPIO_PORT4 53 | 88 | #define IRQ_U300_GPIO_PORT4 53 |
89 | #define IRQ_U300_GPIO_PORT5 54 | 89 | #define IRQ_U300_GPIO_PORT5 54 |
90 | #define IRQ_U300_GPIO_PORT6 55 | 90 | #define IRQ_U300_GPIO_PORT6 55 |
91 | #define U300_NR_IRQS 56 | 91 | #define U300_VIC_IRQS_END 56 |
92 | #endif | 92 | #endif |
93 | 93 | ||
94 | /* The DB3210-specific interrupt lines */ | 94 | /* The DB3210-specific interrupt lines */ |
@@ -106,16 +106,25 @@ | |||
106 | #define IRQ_U300_NFIF 45 | 106 | #define IRQ_U300_NFIF 45 |
107 | #define IRQ_U300_NFIF2 46 | 107 | #define IRQ_U300_NFIF2 46 |
108 | #define IRQ_U300_SYSCON_PLL_LOCK 47 | 108 | #define IRQ_U300_SYSCON_PLL_LOCK 47 |
109 | #define U300_NR_IRQS 48 | 109 | #define U300_VIC_IRQS_END 48 |
110 | #endif | 110 | #endif |
111 | 111 | ||
112 | #ifdef CONFIG_AB3550_CORE | 112 | /* Maximum 8*7 GPIO lines */ |
113 | #define IRQ_AB3550_BASE (U300_NR_IRQS) | 113 | #ifdef CONFIG_GPIO_U300 |
114 | #define IRQ_AB3550_END (IRQ_AB3550_BASE + 37) | 114 | #define IRQ_U300_GPIO_BASE (U300_VIC_IRQS_END) |
115 | #define IRQ_U300_GPIO_END (IRQ_U300_GPIO_BASE + 56) | ||
116 | #else | ||
117 | #define IRQ_U300_GPIO_END (U300_VIC_IRQS_END) | ||
118 | #endif | ||
115 | 119 | ||
116 | #define NR_IRQS (IRQ_AB3550_END + 1) | 120 | /* Optional AB3550 mixsig chip */ |
121 | #ifdef CONFIG_AB3550_CORE | ||
122 | #define IRQ_AB3550_BASE (IRQ_U300_GPIO_END) | ||
123 | #define IRQ_AB3550_END (IRQ_AB3550_BASE + 38) | ||
117 | #else | 124 | #else |
118 | #define NR_IRQS U300_NR_IRQS | 125 | #define IRQ_AB3550_END (IRQ_U300_GPIO_END) |
119 | #endif | 126 | #endif |
120 | 127 | ||
128 | #define NR_IRQS (IRQ_AB3550_END) | ||
129 | |||
121 | #endif | 130 | #endif |