aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-pxa.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@marvell.com>2011-10-10 02:38:46 -0400
committerHaojian Zhuang <haojian.zhuang@marvell.com>2011-11-14 08:07:59 -0500
commit87c49e20579c933d531a376596875b8fd5dcb04f (patch)
treeda23de32023599ce92dbfb6a97887b91d2253a60 /drivers/gpio/gpio-pxa.c
parent6384fdadb48a875bcc1c0f58933275f15f409b76 (diff)
ARM: pxa: use chained interrupt for GPIO0 and GPIO1
GPIO0 and GPIO1 are linked to unique interrupt line in PXA series, others are linked to another interrupt line. All GPIO are linked to one interrupt line in MMP series. Since gpio driver is shared between PXA series and MMP series, define GPIO0 and GPIO1 as chained interrupt chip. So we can move out gpio code from irq.c to gpio-pxa.c. Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Acked-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/gpio/gpio-pxa.c')
-rw-r--r--drivers/gpio/gpio-pxa.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-pxa.c b/drivers/gpio/gpio-pxa.c
index ee137712f9db..a4121bb50cf2 100644
--- a/drivers/gpio/gpio-pxa.c
+++ b/drivers/gpio/gpio-pxa.c
@@ -283,6 +283,20 @@ void __init pxa_init_gpio(int mux_irq, int start, int end, set_wake_t fn)
283 __raw_writel(~0,c->regbase + GEDR_OFFSET); 283 __raw_writel(~0,c->regbase + GEDR_OFFSET);
284 } 284 }
285 285
286#ifdef CONFIG_ARCH_PXA
287 irq = gpio_to_irq(0);
288 irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
289 handle_edge_irq);
290 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
291 irq_set_chained_handler(IRQ_GPIO0, pxa_gpio_demux_handler);
292
293 irq = gpio_to_irq(1);
294 irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
295 handle_edge_irq);
296 set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
297 irq_set_chained_handler(IRQ_GPIO1, pxa_gpio_demux_handler);
298#endif
299
286 for (irq = gpio_to_irq(start); irq <= gpio_to_irq(end); irq++) { 300 for (irq = gpio_to_irq(start); irq <= gpio_to_irq(end); irq++) {
287 irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip, 301 irq_set_chip_and_handler(irq, &pxa_muxed_gpio_chip,
288 handle_edge_irq); 302 handle_edge_irq);