diff options
author | Shawn Guo <shawn.guo@linaro.org> | 2011-09-21 09:24:04 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-09-21 12:26:42 -0400 |
commit | 0e44b6eccfcb0b2da65b0e9eddd5d8b4eac5d8df (patch) | |
tree | 7bc3e9d54c7e35e8ce43852f296708d5a7419d72 /drivers/gpio/gpio-mxc.c | |
parent | 479a0c7eee68243ad9915a9ccc217a35c4e5e0e2 (diff) |
gpio/mxc: add chained_irq_enter/exit() to mx3_gpio_irq_handler()
The mx3_gpio_irq_handler() is also called on imx6q which has GIC as
the primary interrupt controller. As GIC implements the fasteoi flow
control, we need to add chained_irq_enter/exit() to
mx3_gpio_irq_handler() for signaling EOI, otherwise system will hang
whenever there is a gpio irq triggered.
v2: use chained_irq_{enter,exit}()
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/gpio/gpio-mxc.c')
-rw-r--r-- | drivers/gpio/gpio-mxc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-mxc.c b/drivers/gpio/gpio-mxc.c index 4340acae3bd3..82f7b65baf72 100644 --- a/drivers/gpio/gpio-mxc.c +++ b/drivers/gpio/gpio-mxc.c | |||
@@ -30,6 +30,7 @@ | |||
30 | #include <linux/of.h> | 30 | #include <linux/of.h> |
31 | #include <linux/of_device.h> | 31 | #include <linux/of_device.h> |
32 | #include <asm-generic/bug.h> | 32 | #include <asm-generic/bug.h> |
33 | #include <asm/mach/irq.h> | ||
33 | 34 | ||
34 | enum mxc_gpio_hwtype { | 35 | enum mxc_gpio_hwtype { |
35 | IMX1_GPIO, /* runs on i.mx1 */ | 36 | IMX1_GPIO, /* runs on i.mx1 */ |
@@ -232,10 +233,15 @@ static void mx3_gpio_irq_handler(u32 irq, struct irq_desc *desc) | |||
232 | { | 233 | { |
233 | u32 irq_stat; | 234 | u32 irq_stat; |
234 | struct mxc_gpio_port *port = irq_get_handler_data(irq); | 235 | struct mxc_gpio_port *port = irq_get_handler_data(irq); |
236 | struct irq_chip *chip = irq_get_chip(irq); | ||
237 | |||
238 | chained_irq_enter(chip, desc); | ||
235 | 239 | ||
236 | irq_stat = readl(port->base + GPIO_ISR) & readl(port->base + GPIO_IMR); | 240 | irq_stat = readl(port->base + GPIO_ISR) & readl(port->base + GPIO_IMR); |
237 | 241 | ||
238 | mxc_gpio_irq_handler(port, irq_stat); | 242 | mxc_gpio_irq_handler(port, irq_stat); |
243 | |||
244 | chained_irq_exit(chip, desc); | ||
239 | } | 245 | } |
240 | 246 | ||
241 | /* MX2 has one interrupt *for all* gpio ports */ | 247 | /* MX2 has one interrupt *for all* gpio ports */ |