OSDN Git Service

mmc: sdhci-esdhc-imx: only enable DAT[0] and CMD line auto tuning for SDIO device
authorHaibo Chen <haibo.chen@nxp.com>
Fri, 23 Dec 2022 02:50:22 +0000 (10:50 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 23 Jan 2023 14:51:38 +0000 (15:51 +0100)
commit52e4c32baed2a4c79e20a82dc22e307499759852
tree778fe168132da02848e7fee643d963825d072d9f
parentc8c49a5a0b2be2da993cee2a2d7fbb5994e47d7a
mmc: sdhci-esdhc-imx: only enable DAT[0] and CMD line auto tuning for SDIO device

USDHC IP has one limitation: the tuning circuit can't handle the async
sdio device interrupt correctly. When sdio device use 4 data lines,
async sdio interrupt will use the shared DAT[1], if enable auto tuning
circuit to check these 4 data lines, include the DAT[1], this circuit
will detect this interrupt, take this as data on DAT[1], and adjust the
delay cell wrongly, finally will cause the DATA/CMD CRC error.
So for SDIO device, only enable DAT[0] and CMD line for auto tuning.
To distinguish the card type during card init, involve init_card().

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Link: https://lore.kernel.org/r/20221223025022.1893102-3-haibo.chen@nxp.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-esdhc-imx.c