Skip to content

Commit f9e2a5b

Browse files
Romain Naourstorulf
authored andcommitted
mmc: sdhci-omap: re-tuning is needed after a pm transition to support emmc HS200 mode
"PM runtime functions" was been added in sdhci-omap driver in commit f433e8a ("mmc: sdhci-omap: Implement PM runtime functions") along with "card power off and enable aggressive PM" in commit 3edf588 ("mmc: sdhci-omap: Allow SDIO card power off and enable aggressive PM"). Since then, the sdhci-omap driver doesn't work using mmc-hs200 mode due to the tuning values being lost during a pm transition. As for the sdhci_am654 driver, request a new tuning sequence before suspend (sdhci_omap_runtime_suspend()), otherwise the device will trigger cache flush error: mmc1: cache flush error -110 (ETIMEDOUT) mmc1: error -110 doing aggressive suspend followed by I/O errors produced by fdisk -l /dev/mmcblk1boot1: I/O error, dev mmcblk1boot0, sector 64384 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2 I/O error, dev mmcblk1boot1, sector 64384 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 2 I/O error, dev mmcblk1boot1, sector 64384 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev mmcblk1boot1, logical block 8048, async page read I/O error, dev mmcblk1boot0, sector 64384 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2 Buffer I/O error on dev mmcblk1boot0, logical block 8048, async page read Don't re-tune if auto retuning is supported in HW (when SDHCI_TUNING_MODE_3 is available). Link: https://lore.kernel.org/all/[email protected] Fixes: f433e8a ("mmc: sdhci-omap: Implement PM runtime functions") Signed-off-by: Romain Naour <[email protected]> Reviewed-by: Tony Lindgren <[email protected]> Acked-by: Adrian Hunter <[email protected]> Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent cf55a7a commit f9e2a5b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/mmc/host/sdhci-omap.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,6 +1439,9 @@ static int __maybe_unused sdhci_omap_runtime_suspend(struct device *dev)
14391439
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
14401440
struct sdhci_omap_host *omap_host = sdhci_pltfm_priv(pltfm_host);
14411441

1442+
if (host->tuning_mode != SDHCI_TUNING_MODE_3)
1443+
mmc_retune_needed(host->mmc);
1444+
14421445
if (omap_host->con != -EINVAL)
14431446
sdhci_runtime_suspend_host(host);
14441447

0 commit comments

Comments
 (0)