aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2012-02-07 07:48:54 -0500
committerChris Ball <cjb@laptop.org>2012-03-27 12:20:08 -0400
commit6308d2905bd30290d90f28730828fd572161dd11 (patch)
tree5eedb3ba23a4898c56b1d17794ce3e69006b6f86 /drivers
parentda721cf7808f9731454757d704f0aa69ae2f1aae (diff)
mmc: sdhci: add quirk for keeping card power during suspend
Add quirk SDHCI_QUIRK2_HOST_OFF_CARD_ON to cater for the case when the card keeps power during suspend but the host controller does not i.e. the card power is not controlled by the host controller. In that case, the controller must be fully reset on resume. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 1f5888b42b2c..80cc7847c531 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2426,8 +2426,17 @@ int sdhci_resume_host(struct sdhci_host *host)
2426 if (ret) 2426 if (ret)
2427 return ret; 2427 return ret;
2428 2428
2429 sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER)); 2429 if ((host->mmc->pm_flags & MMC_PM_KEEP_POWER) &&
2430 mmiowb(); 2430 (host->quirks2 & SDHCI_QUIRK2_HOST_OFF_CARD_ON)) {
2431 /* Card keeps power but host controller does not */
2432 sdhci_init(host, 0);
2433 host->pwr = 0;
2434 host->clock = 0;
2435 sdhci_do_set_ios(host, &host->mmc->ios);
2436 } else {
2437 sdhci_init(host, (host->mmc->pm_flags & MMC_PM_KEEP_POWER));
2438 mmiowb();
2439 }
2431 2440
2432 ret = mmc_resume_host(host->mmc); 2441 ret = mmc_resume_host(host->mmc);
2433 sdhci_enable_card_detection(host); 2442 sdhci_enable_card_detection(host);