MLK-20957-1 mmc: sdhci-esdhc-imx: correct the fix of ERR004536
authorHaibo Chen <haibo.chen@nxp.com>
Thu, 21 Feb 2019 06:38:04 +0000 (14:38 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Thu, 2 May 2019 08:35:30 +0000 (11:35 +0300)
commit2b4dbbe674f10907b9a2bac0d3a8ffec160ae358
tree78f78074c12347dd1645c5433e850eb1908c11ff
parent3a3bcac2f6a42fbf18c6f4a45a0d23fac52fe794
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>
(cherry picked from commit 2ea2f2b374545ff63a714fabc16c0d7c6b3b47b6)
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit 359538c2faf5d975072c9950e510d61d10815a69)
drivers/mmc/host/sdhci-esdhc-imx.c