aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/sdhci.c13
-rw-r--r--include/linux/mmc/sdhci.h2
2 files changed, 13 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);
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index c750f85177d9..e9051e1cb1ce 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -90,6 +90,8 @@ struct sdhci_host {
90 90
91 unsigned int quirks2; /* More deviations from spec. */ 91 unsigned int quirks2; /* More deviations from spec. */
92 92
93#define SDHCI_QUIRK2_HOST_OFF_CARD_ON (1<<0)
94
93 int irq; /* Device IRQ */ 95 int irq; /* Device IRQ */
94 void __iomem *ioaddr; /* Mapped address */ 96 void __iomem *ioaddr; /* Mapped address */
95 97