diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2010-08-12 18:08:40 -0700 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2011-11-30 21:35:19 -0800 |
commit | 4badc811d4a1682c6c14ddb17f01f1ccab2a19db (patch) | |
tree | 870bf6e3a7d9565bc7e50f9b78256cf57a7377b7 /drivers/mmc | |
parent | 21926347ed420283c98fac29f64b47e1dbb9c879 (diff) |
mmc: sdhci: Skip mmc suspend/resume ops for SDIO device,
enable/disable sdc irq instead of request/free,
mask all sdc interrupts on suspend
Change-Id: I3fb137363c6e639882b796aff8b80784c5256a71
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 0e02cc1df12e..c0ed9f64604d 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -25,6 +25,7 @@ #include <linux/mmc/mmc.h> #include <linux/mmc/host.h> +#include <linux/mmc/card.h> #include "sdhci.h" @@ -2239,7 +2240,8 @@ out: int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state) { - int ret; + int ret = 0; + struct mmc_host *mmc = host->mmc; sdhci_disable_card_detection(host); @@ -2251,15 +2253,17 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state) host->tuning_count * HZ); } - ret = mmc_suspend_host(host->mmc); - if (ret) - return ret; + if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO)) + ret = mmc_suspend_host(host->mmc); - free_irq(host->irq, host); + sdhci_mask_irqs(host, SDHCI_INT_ALL_MASK); if (host->vmmc) ret = regulator_disable(host->vmmc); + if (host->irq) + disable_irq(host->irq); + return ret; } @@ -2267,7 +2271,8 @@ EXPORT_SYMBOL_GPL(sdhci_suspend_host); int sdhci_resume_host(struct sdhci_host *host) { - int ret; + int ret = 0; + struct mmc_host *mmc = host->mmc; if (host->vmmc) { int ret = regulator_enable(host->vmmc); @@ -2281,15 +2286,15 @@ int sdhci_resume_host(struct sdhci_host *host) host->ops->enable_dma(host); } - ret = request_irq(host->irq, sdhci_irq, IRQF_SHARED, - mmc_hostname(host->mmc), host); - if (ret) - return ret; + if (host->irq) + enable_irq(host->irq); sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER)); mmiowb(); - ret = mmc_resume_host(host->mmc); + if (mmc->card && (mmc->card->type != MMC_TYPE_SDIO)) + ret = mmc_resume_host(host->mmc); + sdhci_enable_card_detection(host); /* Set the re-tuning expiration flag */ |