aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharl Liu <[email protected]>2022-11-11 04:23:14 -0800
committerUlf Hansson <[email protected]>2022-12-07 13:22:37 +0100
commit63abdf7237a7ab9e3ee30782d64d968a087c7e7a (patch)
tree726f4e050c5d3ad5fbafc7dfa2755ca3d2b5241e
parent43c487c28f9c353a9690f975e7b7dc56be144427 (diff)
mmc: sdhci: Fix the SD tuning issue that the SDHCI_TRANSFER_MODE is cleared incorrectly
When cmd->opcode == MMC_SEND_TUNING_BLOCK, the SDHCI_TRANSFER_MODE should also be kept Signed-off-by: Charl Liu <[email protected]> Acked-by: Adrian Hunter <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
-rw-r--r--drivers/mmc/host/sdhci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index ebb71d235c38..64750fbb0ac8 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1452,7 +1452,7 @@ static void sdhci_set_transfer_mode(struct sdhci_host *host,
if (host->quirks2 &
SDHCI_QUIRK2_CLEAR_TRANSFERMODE_REG_BEFORE_CMD) {
/* must not clear SDHCI_TRANSFER_MODE when tuning */
- if (cmd->opcode != MMC_SEND_TUNING_BLOCK_HS200)
+ if (!mmc_op_tuning(cmd->opcode))
sdhci_writew(host, 0x0, SDHCI_TRANSFER_MODE);
} else {
/* clear Auto CMD settings for no data CMDs */