summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2014-04-25 12:55:56 +0100
committerChris Ball <chris@printf.net>2014-05-22 07:26:26 -0400
commitbe138554a7923658ded799b0e8794d9c1d08a6e5 (patch)
tree3eb747cd52c888a4798139c0fc9e65b080ec614e /drivers/mmc/host/sdhci.c
parent3560db8e247aa35bc6b287ec7ec51cd41abd512e (diff)
mmc: sdhci: allow sdio interrupts while sdhci runtime suspended
Allow SDIO interrupts to be received while the SDHCI host is runtime suspended. We do this by leaving the AHB clock enabled while the host is runtime suspended so we can access the SDHCI registers, and so read and raise the SDIO card interrupt. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Tested-by: Markus Pargmann <mpa@pengutronix.de> Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-rw-r--r--drivers/mmc/host/sdhci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 8def3919b32c..0ecbcc4c29d2 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1711,8 +1711,7 @@ static int sdhci_get_ro(struct mmc_host *mmc)
static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable)
{
- /* SDIO IRQ will be enabled as appropriate in runtime resume */
- if (!(host->flags & SDHCI_DEVICE_DEAD) || host->runtime_suspended) {
+ if (!(host->flags & SDHCI_DEVICE_DEAD)) {
if (enable)
sdhci_unmask_irqs(host, SDHCI_INT_CARD_INT);
else
@@ -2426,7 +2425,7 @@ static irqreturn_t sdhci_irq(int irq, void *dev_id)
spin_lock(&host->lock);
- if (host->runtime_suspended) {
+ if (host->runtime_suspended && !sdhci_sdio_irq_enabled(host)) {
spin_unlock(&host->lock);
return IRQ_NONE;
}
@@ -2692,7 +2691,7 @@ int sdhci_runtime_suspend_host(struct sdhci_host *host)
}
spin_lock_irqsave(&host->lock, flags);
- sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK);
+ sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK & ~SDHCI_INT_CARD_INT);
spin_unlock_irqrestore(&host->lock, flags);
synchronize_hardirq(host->irq);