summaryrefslogtreecommitdiff
path: root/drivers/mmc/host/sdhci.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@intel.com>2016-12-02 15:14:21 +0200
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit82411a2327e28e37cbd38e52529c0cd241f6efad (patch)
treefbd03c5f23e0777f72b2fd4976cc6a8086124f94 /drivers/mmc/host/sdhci.c
parent3f92828a6990ce5e90dc1ffe74b34622f06752f4 (diff)
mmc: sdhci: Fix tuning reset after exhausting the maximum number of loops
If the driver has exhausted the maximum number of tuning loops, then fixed sampling is used. To do that both SDHCI_CTRL_TUNED_CLK and SDHCI_CTRL_EXEC_TUNING must be reset to 0, but only SDHCI_CTRL_TUNED_CLK was being reset. Reset SDHCI_CTRL_EXEC_TUNING to 0 also. Signed-off-by: Adrian Hunter <adrian.hunter@intel.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> (cherry picked from commit 5ef5203b95c5090ba40e30ee8eedc5a937fc2898)
Diffstat (limited to 'drivers/mmc/host/sdhci.c')
-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 eb83793b2984..40e17e83a9a6 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2146,6 +2146,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
*/
if (tuning_loop_counter < 0) {
ctrl &= ~SDHCI_CTRL_TUNED_CLK;
+ ctrl &= ~SDHCI_CTRL_EXEC_TUNING;
sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2);
}
if (!(ctrl & SDHCI_CTRL_TUNED_CLK)) {