diff options
author | Felipe Balbi <balbi@ti.com> | 2011-06-30 05:51:09 -0400 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-10-24 08:09:12 -0400 |
commit | 925e853c24bc7966cb0d6ed3b88948c33b0a6071 (patch) | |
tree | 534501d2cfc2e76b4a56e2fb8fecb934e7766913 | |
parent | 2f2a7d5ef76477f3d2a333663e7cf7a380aebd82 (diff) |
mfd: Set twl4030-irq irq nested flag
Threads from twl4030's children will be called
nested in the context of the demultiplexing
handler on twl4030-irq.c.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r-- | drivers/mfd/twl4030-irq.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c index 1b9ab2f40d5b..ff16e9c3ba30 100644 --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c | |||
@@ -304,7 +304,7 @@ static irqreturn_t handle_twl4030_pih(int irq, void *devid) | |||
304 | pih_isr; | 304 | pih_isr; |
305 | pih_isr >>= 1, module_irq++) { | 305 | pih_isr >>= 1, module_irq++) { |
306 | if (pih_isr & 0x1) | 306 | if (pih_isr & 0x1) |
307 | generic_handle_irq(module_irq); | 307 | handle_nested_irq(module_irq); |
308 | } | 308 | } |
309 | 309 | ||
310 | return IRQ_HANDLED; | 310 | return IRQ_HANDLED; |
@@ -596,9 +596,7 @@ static void handle_twl4030_sih(unsigned irq, struct irq_desc *desc) | |||
596 | int isr; | 596 | int isr; |
597 | 597 | ||
598 | /* reading ISR acks the IRQs, using clear-on-read mode */ | 598 | /* reading ISR acks the IRQs, using clear-on-read mode */ |
599 | local_irq_enable(); | ||
600 | isr = sih_read_isr(sih); | 599 | isr = sih_read_isr(sih); |
601 | local_irq_disable(); | ||
602 | 600 | ||
603 | if (isr < 0) { | 601 | if (isr < 0) { |
604 | pr_err("twl4030: %s SIH, read ISR error %d\n", | 602 | pr_err("twl4030: %s SIH, read ISR error %d\n", |
@@ -613,7 +611,7 @@ static void handle_twl4030_sih(unsigned irq, struct irq_desc *desc) | |||
613 | isr &= ~BIT(irq); | 611 | isr &= ~BIT(irq); |
614 | 612 | ||
615 | if (irq < sih->bits) | 613 | if (irq < sih->bits) |
616 | generic_handle_irq(agent->irq_base + irq); | 614 | handle_nested_irq(agent->irq_base + irq); |
617 | else | 615 | else |
618 | pr_err("twl4030: %s SIH, invalid ISR bit %d\n", | 616 | pr_err("twl4030: %s SIH, invalid ISR bit %d\n", |
619 | sih->name, irq); | 617 | sih->name, irq); |
@@ -720,6 +718,7 @@ int twl4030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end) | |||
720 | for (i = irq_base; i < irq_end; i++) { | 718 | for (i = irq_base; i < irq_end; i++) { |
721 | irq_set_chip_and_handler(i, &twl4030_irq_chip, | 719 | irq_set_chip_and_handler(i, &twl4030_irq_chip, |
722 | handle_simple_irq); | 720 | handle_simple_irq); |
721 | irq_set_nested_thread(i, 1); | ||
723 | activate_irq(i); | 722 | activate_irq(i); |
724 | } | 723 | } |
725 | twl4030_irq_next = i; | 724 | twl4030_irq_next = i; |
@@ -745,8 +744,10 @@ int twl4030_init_irq(int irq_num, unsigned irq_base, unsigned irq_end) | |||
745 | fail_rqirq: | 744 | fail_rqirq: |
746 | /* clean up twl4030_sih_setup */ | 745 | /* clean up twl4030_sih_setup */ |
747 | fail: | 746 | fail: |
748 | for (i = irq_base; i < irq_end; i++) | 747 | for (i = irq_base; i < irq_end; i++) { |
748 | irq_set_nested_thread(i, 0); | ||
749 | irq_set_chip_and_handler(i, NULL, NULL); | 749 | irq_set_chip_and_handler(i, NULL, NULL); |
750 | } | ||
750 | 751 | ||
751 | return status; | 752 | return status; |
752 | } | 753 | } |