]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/5.0.4/mmc-sdhci-esdhc-imx-fix-hs400-timing-issue.patch
Linux 5.0.4
[thirdparty/kernel/stable-queue.git] / releases / 5.0.4 / mmc-sdhci-esdhc-imx-fix-hs400-timing-issue.patch
CommitLineData
415bbd25
GKH
1From de0a0decf2edfc5b0c782915f4120cf990a9bd13 Mon Sep 17 00:00:00 2001
2From: BOUGH CHEN <haibo.chen@nxp.com>
3Date: Thu, 27 Dec 2018 11:20:24 +0000
4Subject: mmc: sdhci-esdhc-imx: fix HS400 timing issue
5
6From: BOUGH CHEN <haibo.chen@nxp.com>
7
8commit de0a0decf2edfc5b0c782915f4120cf990a9bd13 upstream.
9
10Now tuning reset will be done when the timing is MMC_TIMING_LEGACY/
11MMC_TIMING_MMC_HS/MMC_TIMING_SD_HS. But for timing MMC_TIMING_MMC_HS,
12we can not do tuning reset, otherwise HS400 timing is not right.
13
14Here is the process of init HS400, first finish tuning in HS200 mode,
15then switch to HS mode and 8 bit DDR mode, finally switch to HS400
16mode. If we do tuning reset in HS mode, this will cause HS400 mode
17lost the tuning setting, which will cause CRC error.
18
19Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
20Cc: stable@vger.kernel.org # v4.12+
21Acked-by: Adrian Hunter <adrian.hunter@intel.com>
22Fixes: d9370424c948 ("mmc: sdhci-esdhc-imx: reset tuning circuit when power on mmc card")
23Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
24Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25
26---
27 drivers/mmc/host/sdhci-esdhc-imx.c | 1 +
28 1 file changed, 1 insertion(+)
29
30--- a/drivers/mmc/host/sdhci-esdhc-imx.c
31+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
32@@ -979,6 +979,7 @@ static void esdhc_set_uhs_signaling(stru
33 case MMC_TIMING_UHS_SDR25:
34 case MMC_TIMING_UHS_SDR50:
35 case MMC_TIMING_UHS_SDR104:
36+ case MMC_TIMING_MMC_HS:
37 case MMC_TIMING_MMC_HS200:
38 writel(m, host->ioaddr + ESDHC_MIX_CTRL);
39 break;