summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSujit Reddy Thumma <sthumma@codeaurora.org>2014-01-21 17:22:05 +0530
committerSubhash Jadavani <subhashj@codeaurora.org>2016-05-27 10:29:00 -0700
commitd621731e5f48f9fc29c5058163e7668b63060f9e (patch)
tree20b3ca880f1d4173439ac021839edee4658372e4 /drivers
parentd90d5901faba22e9bc67ade166de12b63412c44c (diff)
mmc: sdhci: Fix possible spec. violation during voltage switch sequence
With commit 0797e5f145 (mmc: core: Fixup signal voltage switch), voltage switch sequence for UHS-I cards is broken if used with sdhci driver. The commit expects the SD clock to be disabled when mmc_set_ios() is issued but sdhci_do_set_ios() re-enables the SD clock for few cycles after disabling which is a specification violation during voltage switch sequence. This failure is observed only for a small group of cards where they ultimately fall-back into high-speed mode even if UHS-I modes are supported. Change-Id: Ie275326627a84bfcd4352637a043296c01c175a6 Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 34678c4e9c31..022c6319a0c8 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1814,7 +1814,8 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
/* Re-enable SD Clock */
- host->ops->set_clock(host, host->clock);
+ if (ios->clock)
+ host->ops->set_clock(host, host->clock);
}
/* Reset SD Clock Enable */
@@ -1841,7 +1842,8 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
}
/* Re-enable SD Clock */
- host->ops->set_clock(host, host->clock);
+ if (ios->clock)
+ host->ops->set_clock(host, host->clock);
} else
sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);