MLK-14381 mmc: sdhci-esdhc-imx: reset tuning circuit when system resume
authorHaibo Chen <haibo.chen@nxp.com>
Thu, 23 Mar 2017 07:54:20 +0000 (15:54 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:21:49 +0000 (15:21 -0500)
commit2973b837ea2b1bdb9f57a48f5674151e3d2bf13a
tree85500a1044021a355ff62018bf64811954ff828a
parent2614fd41f5b33ee4c1bd1e4b69ab138e66586820
MLK-14381 mmc: sdhci-esdhc-imx: reset tuning circuit when system resume

USDHC tuning circuit should be reset before every time card enumeration
or re-enumeration.

On imx7ulp-evk board, for SDR104 card, when system suspend in standby
mode, and then resume back, the IO timing is still SDR104 which may
result in card re-enumeration fail in low speed mode (400khz) for some
cards. And we did meet the issue that in certain probability, SDR104
card meet mmc command CRC/Timeout error when send CMD2 during mmc bus
resume.

This patch reset the tuning circuit when the ios timing is
MMC_TIMING_LEGACY/MMC_TIMING_MMC_HS/MMC_TIMING_SD_HS, which means both
mmc_power_up() and mmc_power_off() will reset the tuning circuit.

This patch can cover the 'commit 374da688c65a ("MLK-12345 mmc:
sdhci-esdhc-imx: reset tuning circurt when insert sd card")', and is a
better solution. So use this patch instead.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit 84a6b78bc4e2ccd433b25a4261194b93e6f83323)

Conflicts:
drivers/mmc/host/sdhci-esdhc-imx.c
drivers/mmc/host/sdhci-esdhc-imx.c