diff options
author | Barry Song <Baohua.Song@csr.com> | 2012-09-27 05:56:10 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-09-28 03:27:36 -0400 |
commit | 6fd4011e165e4a28c06a044c919161e657138181 (patch) | |
tree | c87d27e690ddb1ae7ef38675217ec1a25799fe22 /drivers/pinctrl/pinctrl-sirf.c | |
parent | 19830401396d19345ea5ada50a9adddbf1fd65f0 (diff) |
pinctrl: sirf: add lost chained_irq_enter and exit in sirfsoc_gpio_handle_irq
This patch fixes the chained irq hang issue, tested by DM9000 driver using
GPIO0-3(irqnr=131) as the external IRQ on SiRFmarco:
$ cat /proc/interrupts
CPU0 CPU1
32: 1608 0 GIC sirfsoc_timer0
33: 0 3197 GIC sirfsoc_timer1
50: 10207 0 GIC sirfsoc-uart
56: 2 0 GIC cc0e0000.i2c
70: 44 0 GIC mmc0
131: 333 0 sirf-gpio-irq eth0
...
Signed-off-by: Barry Song <Baohua.Song@csr.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-sirf.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-sirf.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-sirf.c b/drivers/pinctrl/pinctrl-sirf.c index 8bf781e8c35e..fa88655c5e96 100644 --- a/drivers/pinctrl/pinctrl-sirf.c +++ b/drivers/pinctrl/pinctrl-sirf.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/bitops.h> | 24 | #include <linux/bitops.h> |
25 | #include <linux/gpio.h> | 25 | #include <linux/gpio.h> |
26 | #include <linux/of_gpio.h> | 26 | #include <linux/of_gpio.h> |
27 | #include <asm/mach/irq.h> | ||
27 | 28 | ||
28 | #define DRIVER_NAME "pinmux-sirf" | 29 | #define DRIVER_NAME "pinmux-sirf" |
29 | 30 | ||
@@ -1427,6 +1428,9 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc) | |||
1427 | u32 status, ctrl; | 1428 | u32 status, ctrl; |
1428 | int idx = 0; | 1429 | int idx = 0; |
1429 | unsigned int first_irq; | 1430 | unsigned int first_irq; |
1431 | struct irq_chip *chip = irq_get_chip(irq); | ||
1432 | |||
1433 | chained_irq_enter(chip, desc); | ||
1430 | 1434 | ||
1431 | status = readl(bank->chip.regs + SIRFSOC_GPIO_INT_STATUS(bank->id)); | 1435 | status = readl(bank->chip.regs + SIRFSOC_GPIO_INT_STATUS(bank->id)); |
1432 | if (!status) { | 1436 | if (!status) { |
@@ -1455,6 +1459,8 @@ static void sirfsoc_gpio_handle_irq(unsigned int irq, struct irq_desc *desc) | |||
1455 | idx++; | 1459 | idx++; |
1456 | status = status >> 1; | 1460 | status = status >> 1; |
1457 | } | 1461 | } |
1462 | |||
1463 | chained_irq_exit(chip, desc); | ||
1458 | } | 1464 | } |
1459 | 1465 | ||
1460 | static inline void sirfsoc_gpio_set_input(struct sirfsoc_gpio_bank *bank, unsigned ctrl_offset) | 1466 | static inline void sirfsoc_gpio_set_input(struct sirfsoc_gpio_bank *bank, unsigned ctrl_offset) |