diff options
| author | Sascha Hauer <s.hauer@pengutronix.de> | 2009-06-15 06:36:25 -0400 |
|---|---|---|
| committer | Sascha Hauer <s.hauer@pengutronix.de> | 2009-08-07 06:11:09 -0400 |
| commit | 8afaada2dc9247ffcd2982be824cd290ace18f55 (patch) | |
| tree | b9992022601458f087c5d439ca0dd077f95a2924 /arch/arm/plat-mxc/gpio.c | |
| parent | 61b032ef263c17bb733cfb3f87a811be52adbe22 (diff) | |
mxc gpio: CONFIG_ARCH_* -> cpu_is_*()
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/plat-mxc/gpio.c')
| -rw-r--r-- | arch/arm/plat-mxc/gpio.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/arch/arm/plat-mxc/gpio.c b/arch/arm/plat-mxc/gpio.c index 7506d963be4b..b70715720350 100644 --- a/arch/arm/plat-mxc/gpio.c +++ b/arch/arm/plat-mxc/gpio.c | |||
| @@ -162,7 +162,6 @@ static void mxc_gpio_irq_handler(struct mxc_gpio_port *port, u32 irq_stat) | |||
| 162 | } | 162 | } |
| 163 | } | 163 | } |
| 164 | 164 | ||
| 165 | #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1) | ||
| 166 | /* MX1 and MX3 has one interrupt *per* gpio port */ | 165 | /* MX1 and MX3 has one interrupt *per* gpio port */ |
| 167 | static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc) | 166 | static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc) |
| 168 | { | 167 | { |
| @@ -174,9 +173,7 @@ static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc) | |||
| 174 | 173 | ||
| 175 | mxc_gpio_irq_handler(port, irq_stat); | 174 | mxc_gpio_irq_handler(port, irq_stat); |
| 176 | } | 175 | } |
| 177 | #endif | ||
| 178 | 176 | ||
| 179 | #ifdef CONFIG_ARCH_MX2 | ||
| 180 | /* MX2 has one interrupt *for all* gpio ports */ | 177 | /* MX2 has one interrupt *for all* gpio ports */ |
| 181 | static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc) | 178 | static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc) |
| 182 | { | 179 | { |
| @@ -195,7 +192,6 @@ static void mx2_gpio_irq_handler(u32 irq, struct irq_desc *desc) | |||
| 195 | mxc_gpio_irq_handler(&port[i], irq_stat); | 192 | mxc_gpio_irq_handler(&port[i], irq_stat); |
| 196 | } | 193 | } |
| 197 | } | 194 | } |
| 198 | #endif | ||
| 199 | 195 | ||
| 200 | static struct irq_chip gpio_irq_chip = { | 196 | static struct irq_chip gpio_irq_chip = { |
| 201 | .ack = gpio_ack_irq, | 197 | .ack = gpio_ack_irq, |
| @@ -284,17 +280,18 @@ int __init mxc_gpio_init(struct mxc_gpio_port *port, int cnt) | |||
| 284 | /* its a serious configuration bug when it fails */ | 280 | /* its a serious configuration bug when it fails */ |
| 285 | BUG_ON( gpiochip_add(&port[i].chip) < 0 ); | 281 | BUG_ON( gpiochip_add(&port[i].chip) < 0 ); |
| 286 | 282 | ||
| 287 | #if defined(CONFIG_ARCH_MX3) || defined(CONFIG_ARCH_MX1) | 283 | if (cpu_is_mx1() || cpu_is_mx3()) { |
| 288 | /* setup one handler for each entry */ | 284 | /* setup one handler for each entry */ |
| 289 | set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler); | 285 | set_irq_chained_handler(port[i].irq, mx3_gpio_irq_handler); |
| 290 | set_irq_data(port[i].irq, &port[i]); | 286 | set_irq_data(port[i].irq, &port[i]); |
| 291 | #endif | 287 | } |
| 288 | } | ||
| 289 | |||
| 290 | if (cpu_is_mx2()) { | ||
| 291 | /* setup one handler for all GPIO interrupts */ | ||
| 292 | set_irq_chained_handler(port[0].irq, mx2_gpio_irq_handler); | ||
| 293 | set_irq_data(port[0].irq, port); | ||
| 292 | } | 294 | } |
| 293 | 295 | ||
| 294 | #ifdef CONFIG_ARCH_MX2 | ||
| 295 | /* setup one handler for all GPIO interrupts */ | ||
| 296 | set_irq_chained_handler(port[0].irq, mx2_gpio_irq_handler); | ||
| 297 | set_irq_data(port[0].irq, port); | ||
| 298 | #endif | ||
| 299 | return 0; | 296 | return 0; |
| 300 | } | 297 | } |
