summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2013-11-15 17:54:36 +0800
committerDong Aisheng <b29396@freescale.com>2013-11-22 15:50:13 +0800
commit8345287f4f634094dd26d9e1e3c313598b404de3 (patch)
tree098dbd62719dd0a7ba94044aee85b3e2513a5ddf
parentb6280f28e4f5ef7acc10b86ffd395f535e31e8b1 (diff)
ENGR00289279 mmc: sdhci: get runtime pm when sdio irq is enabled
SDIO cards may need clock to send the card interrupt to host. Thus, we get runtime pm when sdio irq is enabled to prevent the clock resource is released and put it when sdio irq is disabled. Signed-off-by: Dong Aisheng <b29396@freescale.com> (cherry picked from commit 2ced65a11885ea84c6d3cd2ec8832d489bb0c3f7)
-rw-r--r--drivers/mmc/host/sdhci.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index c229bb5f76e4..fc63c23a1d6b 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1697,6 +1697,9 @@ static int sdhci_get_ro(struct mmc_host *mmc)
static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable)
{
+ if (enable)
+ sdhci_runtime_pm_get(host);
+
if (host->flags & SDHCI_DEVICE_DEAD)
goto out;
@@ -1715,6 +1718,9 @@ static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable)
sdhci_mask_irqs(host, SDHCI_INT_CARD_INT);
out:
mmiowb();
+
+ if (!enable)
+ sdhci_runtime_pm_put(host);
}
static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable)