aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2013-10-18 07:48:45 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:05:49 -0400
commit6f522be6a849db8666676a91080cff7bbf312215 (patch)
treeb27f78c5ad89f03191a79580c131472336ed5837 /drivers/mmc
parent5470fb9831176669c6c837ee261b65ba0a415b36 (diff)
mmc: sdhci: report error once the maximum tuning loops exhausted or timeout
The original code missed to report an error when the maximum tuning loops exhausted or timeout, it will cause the upper layer to wrongly think the tuning process is passed. Signed-off-by: Dong Aisheng <b29396@freescale.com> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index e48a53c38989..5c9833a73fe6 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1973,6 +1973,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
1973 if (!tuning_loop_counter || !timeout) { 1973 if (!tuning_loop_counter || !timeout) {
1974 ctrl &= ~SDHCI_CTRL_TUNED_CLK; 1974 ctrl &= ~SDHCI_CTRL_TUNED_CLK;
1975 sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); 1975 sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
1976 err = -EIO;
1976 } else { 1977 } else {
1977 if (!(ctrl & SDHCI_CTRL_TUNED_CLK)) { 1978 if (!(ctrl & SDHCI_CTRL_TUNED_CLK)) {
1978 pr_info(DRIVER_NAME ": Tuning procedure" 1979 pr_info(DRIVER_NAME ": Tuning procedure"