diff mbox series

[5/6] mmc: mmc_spi: Generate R1 response for erase block start and end address

Message ID 20200629094730.10051-6-pragnesh.patel@sifive.com
State Awaiting Upstream
Delegated to: Peng Fan
Headers show
Series mmc_spi: mmc erase resolve | expand

Commit Message

Pragnesh Patel June 29, 2020, 9:47 a.m. UTC
Erase block start address (CMD32) and erase block end address (CMD33)
command will generate R1 response for mmc SPI mode.

R1 response is 1 byte long for mmc SPI, so assign 1 byte as a response
for this commands.

Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
---
 drivers/mmc/mmc_spi.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bin Meng July 8, 2020, 5:22 a.m. UTC | #1
On Mon, Jun 29, 2020 at 5:48 PM Pragnesh Patel
<pragnesh.patel@sifive.com> wrote:
>
> Erase block start address (CMD32) and erase block end address (CMD33)
> command will generate R1 response for mmc SPI mode.
>
> R1 response is 1 byte long for mmc SPI, so assign 1 byte as a response
> for this commands.
>
> Signed-off-by: Pragnesh Patel <pragnesh.patel@sifive.com>
> ---
>  drivers/mmc/mmc_spi.c | 2 ++
>  1 file changed, 2 insertions(+)
>

Reviewed-by: Bin Meng <bin.meng@windriver.com>
Tested-by: Bin Meng <bin.meng@windriver.com>
diff mbox series

Patch

diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index ee56de36ec..96a41076dc 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -309,6 +309,8 @@  static int dm_mmc_spi_request(struct udevice *dev, struct mmc_cmd *cmd,
 	case MMC_CMD_WRITE_SINGLE_BLOCK:
 	case MMC_CMD_WRITE_MULTIPLE_BLOCK:
 	case MMC_CMD_APP_CMD:
+	case SD_CMD_ERASE_WR_BLK_START:
+	case SD_CMD_ERASE_WR_BLK_END:
 		resp = &resp8;
 		resp_size = sizeof(resp8);
 		break;