]>
Commit | Line | Data |
---|---|---|
1143c684 SL |
1 | From d7735df1090923b5ebdffbb9505d247936446e09 Mon Sep 17 00:00:00 2001 |
2 | From: Yinbo Zhu <yinbo.zhu@nxp.com> | |
3 | Date: Mon, 11 Mar 2019 02:16:40 +0000 | |
4 | Subject: mmc: sdhci-of-esdhc: add erratum eSDHC-A001 and A-008358 support | |
5 | MIME-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | [ Upstream commit 05cb6b2a66fa7837211a060878e91be5eb10cb07 ] | |
10 | ||
11 | eSDHC-A001: The data timeout counter (SYSCTL[DTOCV]) is not | |
12 | reliable for DTOCV values 0x4(2^17 SD clock), 0x8(2^21 SD clock), | |
13 | and 0xC(2^25 SD clock). The data timeout counter can count from | |
14 | 2^13–2^27, but for values 2^17, 2^21, and 2^25, the timeout | |
15 | counter counts for only 2^13 SD clocks. | |
16 | A-008358: The data timeout counter value loaded into the timeout | |
17 | counter is less than expected and can result into early timeout | |
18 | error in case of eSDHC data transactions. The table below shows | |
19 | the expected vs actual timeout period for different values of | |
20 | SYSCTL[DTOCV]: | |
21 | these two erratum has the same quirk to control it, and set | |
22 | SDHCI_QUIRK_RESET_AFTER_REQUEST to fix above issue. | |
23 | ||
24 | Signed-off-by: Yinbo Zhu <yinbo.zhu@nxp.com> | |
25 | Acked-by: Adrian Hunter <adrian.hunter@intel.com> | |
26 | Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> | |
27 | Signed-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 | ||
32 | diff --git a/drivers/mmc/host/sdhci-of-esdhc.c b/drivers/mmc/host/sdhci-of-esdhc.c | |
33 | index 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 | -- | |
49 | 2.20.1 | |
50 |