Skip to content

Commit 32a9cdb

Browse files
Haibo Chenstorulf
authored andcommitted
mmc: core: sdio: hold retuning if sdio in 1-bit mode
tuning only support in 4-bit mode or 8 bit mode, so in 1-bit mode, need to hold retuning. Find this issue when use manual tuning method on imx93. When system resume back, SDIO WIFI try to switch back to 4 bit mode, first will trigger retuning, and all tuning command failed. Signed-off-by: Haibo Chen <[email protected]> Acked-by: Adrian Hunter <[email protected]> Fixes: dfa13eb ("mmc: host: Add facility to support re-tuning") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 1bbac8d commit 32a9cdb

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/mmc/core/sdio.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,8 +1089,14 @@ static int mmc_sdio_resume(struct mmc_host *host)
10891089
}
10901090
err = mmc_sdio_reinit_card(host);
10911091
} else if (mmc_card_wake_sdio_irq(host)) {
1092-
/* We may have switched to 1-bit mode during suspend */
1092+
/*
1093+
* We may have switched to 1-bit mode during suspend,
1094+
* need to hold retuning, because tuning only supprt
1095+
* 4-bit mode or 8 bit mode.
1096+
*/
1097+
mmc_retune_hold_now(host);
10931098
err = sdio_enable_4bit_bus(host->card);
1099+
mmc_retune_release(host);
10941100
}
10951101

10961102
if (err)

0 commit comments

Comments
 (0)