[PATCH] mmc: mmc_spi: Do not drop first RX byte after CMD TX

Jiaxun Yang jiaxun.yang at flygoat.com
Sun Jan 24 07:34:02 CET 2021

As per MMC SPI specification, R1 response could just follow
the CMD TX. Currently we drop the first RX byte after the CMD
TX. It is harmless in realworld as MMC card need time to take
command action so the first resp will always be R1b(busy).

However in QEMU ssi-sd emulation, R1 resp is just followed after,
so R1 will be dropped here.

Signed-off-by: Jiaxun Yang <jiaxun.yang at flygoat.com>
 drivers/mmc/mmc_spi.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index 46800bbed2..1da963ba1e 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -94,10 +94,6 @@ static int mmc_spi_sendcmd(struct udevice *dev,
 	if (ret)
 		return ret;
-	ret = dm_spi_xfer(dev, 1 * 8, NULL, &r, 0);
-	if (ret)
-		return ret;
 	if (!resp || !resp_size)
 		return 0;

More information about the U-Boot mailing list