diff options
author | Alexey Neyman <stilor@att.net> | 2013-11-05 22:40:36 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:47:07 -0400 |
commit | 00918720ad19ace099f9462d8b796af7a785b0c4 (patch) | |
tree | a3b143a4fbce3320dbcccc65e5d28c7733f4bba4 /drivers/mmc | |
parent | 1a8e785dc7f21ae0b52c27ade3537d4890359144 (diff) |
mmc: sdhci: Avoid needless loop while handling SDIO interrupts in sdhci_irq()
Ignore Card Interrupt bit in the interrupt status if we already know that
mmc_signal_sdio_irq() is going to be called at the end of sdhci_irq(). This
avoids a needless loop in sdhci_irq() repeatedly reading interrupt status
and doing nothing.
Signed-off-by: Alexey Neyman <stilor@att.net>
Acked-by: Dong Aisheng <b29396@freescale.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 1501dca68039..a44f96698863 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c | |||
@@ -2486,6 +2486,14 @@ again: | |||
2486 | result = IRQ_HANDLED; | 2486 | result = IRQ_HANDLED; |
2487 | 2487 | ||
2488 | intmask = sdhci_readl(host, SDHCI_INT_STATUS); | 2488 | intmask = sdhci_readl(host, SDHCI_INT_STATUS); |
2489 | |||
2490 | /* | ||
2491 | * If we know we'll call the driver to signal SDIO IRQ, disregard | ||
2492 | * further indications of Card Interrupt in the status to avoid a | ||
2493 | * needless loop. | ||
2494 | */ | ||
2495 | if (cardint) | ||
2496 | intmask &= ~SDHCI_INT_CARD_INT; | ||
2489 | if (intmask && --max_loops) | 2497 | if (intmask && --max_loops) |
2490 | goto again; | 2498 | goto again; |
2491 | out: | 2499 | out: |