summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2016-04-24 16:49:25 +0200
committerDominik Sliwa <dominik.sliwa@toradex.com>2016-06-22 15:29:34 +0200
commit0e6396ed35ce5ddf8825298f08faa4bb598d2750 (patch)
tree79a7a1338b9adc696adfff265368247ba152d103
parentc33fe5aa20f2615f86762f8d68d087ca6d077d6c (diff)
mmc: host: sdhci: fix suspend/resume issue
This fixes the following eMMC suspend/resume issue as seen on Colibri T30 1GB IT V1.1A: [ 75.479664] mmcblk0: error -110 transferring data, sector 287240, nr 2, cmd response 0x900, card status 0xc00 [ 75.580923] end_request: I/O error, dev mmcblk0, sector 287240 [ 75.586782] Buffer I/O error on device mmcblk0p2, logical block 123140 [ 75.593313] lost page write due to I/O error on mmcblk0p2 (fixes an issue probably caused by a merge conflict introduced by commit 7f7b042a978edfc6c7d1e14ec9c6ec01ffcc284b) Signed-off-by: Mirza Krak <mirza.krak@hostmobility.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com> Acked-by: Dominik Sliwa <dominik.sliwa@toradex.com>
-rw-r--r--drivers/mmc/host/sdhci.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 1aed27869b3c..41b578299e66 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2439,6 +2439,15 @@ int sdhci_suspend_host(struct sdhci_host *host, pm_message_t state)
}
if (mmc->card) {
+ /*
+ * If eMMC cards are put in sleep state, Vccq can be disabled
+ * but Vcc would still be powered on. In resume, we only restore
+ * the controller context. So, set MMC_PM_KEEP_POWER flag.
+ */
+ if (mmc_card_can_sleep(mmc) &&
+ !(mmc->caps & MMC_CAP2_NO_SLEEP_CMD))
+ mmc->pm_flags = MMC_PM_KEEP_POWER;
+
ret = mmc_suspend_host(host->mmc);
if (ret)
goto err_suspend_host;