diff options
author | Dong Aisheng <b29396@freescale.com> | 2013-11-15 04:54:36 -0500 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:47:22 -0400 |
commit | 1e9d4fcadfd079f3376b4e0496b3bef5f2fe2e81 (patch) | |
tree | 6010b566bcbc5f3fd893e22264d3fd7de98b5843 | |
parent | 620cf8d909237e42d57e213d8afd56cca6f345be (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>
-rw-r--r-- | drivers/mmc/host/sdhci.c | 6 |
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) | |||
1697 | 1697 | ||
1698 | static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable) | 1698 | static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable) |
1699 | { | 1699 | { |
1700 | if (enable) | ||
1701 | sdhci_runtime_pm_get(host); | ||
1702 | |||
1700 | if (host->flags & SDHCI_DEVICE_DEAD) | 1703 | if (host->flags & SDHCI_DEVICE_DEAD) |
1701 | goto out; | 1704 | goto out; |
1702 | 1705 | ||
@@ -1715,6 +1718,9 @@ static void sdhci_enable_sdio_irq_nolock(struct sdhci_host *host, int enable) | |||
1715 | sdhci_mask_irqs(host, SDHCI_INT_CARD_INT); | 1718 | sdhci_mask_irqs(host, SDHCI_INT_CARD_INT); |
1716 | out: | 1719 | out: |
1717 | mmiowb(); | 1720 | mmiowb(); |
1721 | |||
1722 | if (!enable) | ||
1723 | sdhci_runtime_pm_put(host); | ||
1718 | } | 1724 | } |
1719 | 1725 | ||
1720 | static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) | 1726 | static void sdhci_enable_sdio_irq(struct mmc_host *mmc, int enable) |