All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiaxun Yang <jiaxun.yang@flygoat.com>
To: u-boot@lists.denx.de
Subject: [PATCH] mmc: mmc_spi: Do not drop first RX byte after CMD TX
Date: Sun, 24 Jan 2021 14:34:02 +0800	[thread overview]
Message-ID: <20210124063402.208203-1-jiaxun.yang@flygoat.com> (raw)

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@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;
 
-- 
2.30.0

             reply	other threads:[~2021-01-24  6:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-24  6:34 Jiaxun Yang [this message]
2021-01-24 11:38 ` [PATCH] mmc: mmc_spi: Do not drop first RX byte after CMD TX Meng, Bin
2021-01-25  3:32   ` Jiaxun Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210124063402.208203-1-jiaxun.yang@flygoat.com \
    --to=jiaxun.yang@flygoat.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.