From 2ea2f2b374545ff63a714fabc16c0d7c6b3b47b6 Mon Sep 17 00:00:00 2001 From: Haibo Chen <haibo.chen@nxp.com> Date: Thu, 21 Feb 2019 14:38:04 +0800 Subject: [PATCH] MLK-20957-1 mmc: sdhci-esdhc-imx: correct the fix of ERR004536 the commit 885c943ca13d ("ENGR00288842 mmc: sdhci-esdhc-imx: add ADMA Length Mismatch errata fix") involve the fix of ERR004536. But double confirm with IC, need to clear the bit 7 of register 0x6c rather than set this bit 7. here is the function of bit 7 of 0x6c: 0: enable the new IC fix for ERR004536 1: do not use the IC fix, keep the same as before Due to the reset value of this bit 7 is 0, and ROM code also do not touch this bit 7, so this patch directly remove the operation of this bit 7, make sure the fix of ERR004536 can work. Note, for all versons of 6DQP 6DQ 6DL and 6SL, IC do not has this hardware fix, so writing this bit has no effect and we keep using ADMA as before which has been used for several years with the consideration of no performance drop. For other SoC like imx6SLL imx6SX imx6UL/imx6ULL imx7 imx8, IC already contain this hareware fix, so must make sure the bit 7 of the register 0x6c is 0. If not, we meet the ADMA length mismatch error on imx8mm-evk and imx8qxp-ddr3l-val board when enable CMDQ. Signed-off-by: Haibo Chen <haibo.chen@nxp.com> --- drivers/mmc/host/sdhci-esdhc-imx.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index a440af188ed2dd..b8e11a77e27410 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1199,12 +1199,6 @@ static void sdhci_esdhc_imx_hwinit(struct sdhci_host *host) writel(readl(host->ioaddr + SDHCI_HOST_CONTROL) | ESDHC_BURST_LEN_EN_INCR, host->ioaddr + SDHCI_HOST_CONTROL); - /* - * erratum ESDHC_FLAG_ERR004536 fix for MX6Q TO1.2 and MX6DL - * TO1.1, it's harmless for MX6SL - */ - writel(readl(host->ioaddr + 0x6c) | BIT(7), - host->ioaddr + 0x6c); /* disable DLL_CTRL delay line settings */ writel(0x0, host->ioaddr + ESDHC_DLL_CTRL); -- GitLab