]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mmc: litex_mmc: Set mandatory idle clocks before CMD0
authorInochi Amaoto <inochiama@gmail.com>
Thu, 21 May 2026 07:21:21 +0000 (15:21 +0800)
committerUlf Hansson <ulfh@kernel.org>
Fri, 29 May 2026 12:44:14 +0000 (14:44 +0200)
commit99982b743e5ba72bd1f5de0e03e3b96ae70b1e51
tree4ecd8b8dc55e4f2995ff83f33e84d8b64273c651
parentb837e38c255dd9f8b53511d52e87f1fda32b3dfe
mmc: litex_mmc: Set mandatory idle clocks before CMD0

The litex_mmc driver assumes the card is already probed in the BIOS
and skip the phy initialization. This will cause the command fail
like the following when the old card is unplugged and then insert
a new card:

[   62.923593] litex-mmc f0004000.mmc: Command (cmd 8) error, status -110
[   62.949717] litex-mmc f0004000.mmc: Command (cmd 55) error, status -110
[   62.976606] litex-mmc f0004000.mmc: Command (cmd 55) error, status -110
[   63.002516] litex-mmc f0004000.mmc: Command (cmd 55) error, status -110
[   63.028442] litex-mmc f0004000.mmc: Command (cmd 55) error, status -110

Add required clock settings and initialization for the CMD 0, so it can
probe the new card.

Fixes: 92e099104729 ("mmc: Add driver for LiteX's LiteSDCard interface")
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Reviewed-by: Gabriel Somlo <gsomlo@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson <ulfh@kernel.org>
drivers/mmc/host/litex_mmc.c