]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - queue-4.4/mmc-sdhci-of-esdhc-add-erratum-esdhc-a001-and-a-0083.patch
drop drm-rockchip-shutdown-drm-subsystem-on-shutdown.patch from 4.4.y and 4.9.y
[thirdparty/kernel/stable-queue.git] / queue-4.4 / mmc-sdhci-of-esdhc-add-erratum-esdhc-a001-and-a-0083.patch
CommitLineData
1143c684
SL
1From d7735df1090923b5ebdffbb9505d247936446e09 Mon Sep 17 00:00:00 2001
2From: Yinbo Zhu <yinbo.zhu@nxp.com>
3Date: Mon, 11 Mar 2019 02:16:40 +0000
4Subject: mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9[ Upstream commit 05cb6b2a66fa7837211a060878e91be5eb10cb07 ]
10
11eSDHC-A001: The data timeout counter (SYSCTL[DTOCV]) is not
12reliable for DTOCV values 0x4(2^17 SD clock), 0x8(2^21 SD clock),
13and 0xC(2^25 SD clock). The data timeout counter can count from
142^13–2^27, but for values 2^17, 2^21, and 2^25, the timeout
15counter counts for only 2^13 SD clocks.
16A-008358: The data timeout counter value loaded into the timeout
17counter is less than expected and can result into early timeout
18error in case of eSDHC data transactions. The table below shows
19the expected vs actual timeout period for different values of
20SYSCTL[DTOCV]:
21these two erratum has the same quirk to control it, and set
22SDHCI_QUIRK_RESET_AFTER_REQUEST to fix above issue.
23
24Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com>
25Acked-by: Adrian Hunter <adrian.hunter@intel.com>
26Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
27Signed-off-by: Sasha Levin <sashal@kernel.org>
28---
29 drivers/mmc/host/sdhci-of-esdhc.c | 4 +++-
30 1 file changed, 3 insertions(+), 1 deletion(-)
31
32diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c
33index a5a11e7ab53b4..356b294c93c9e 100644
34--- a/drivers/mmc/host/sdhci-of-esdhc.c
35+++ b/drivers/mmc/host/sdhci-of-esdhc.c
36@@ -624,8 +624,10 @@ static int sdhci_esdhc_probe(struct platform_device *pdev)
37 if (esdhc->vendor_ver > VENDOR_V_22)
38 host->quirks &= ~SDHCI_QUIRK_NO_BUSY_IRQ;
39
40- if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc"))
41+ if (of_find_compatible_node(NULL, NULL, "fsl,p2020-esdhc")) {
42 host->quirks2 |= SDHCI_QUIRK_RESET_AFTER_REQUEST;
43+ host->quirks2 |= SDHCI_QUIRK_BROKEN_TIMEOUT_VAL;
44+ }
45
46 if (of_device_is_compatible(np, "fsl,p5040-esdhc") ||
47 of_device_is_compatible(np, "fsl,p5020-esdhc") ||
48--
492.20.1
50