[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 60/67] hw/sd/sdcard: Add spi_cmd_CRC_ON_OFF handler (CMD59)
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 60/67] hw/sd/sdcard: Add spi_cmd_CRC_ON_OFF handler (CMD59) |
Date: |
Tue, 2 Jul 2024 11:20:43 +0200 |
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Message-Id: <20240628070216.92609-68-philmd@linaro.org>
---
hw/sd/sd.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 08fb3cf9d3..31cebe609c 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1647,6 +1647,12 @@ static sd_rsp_type_t spi_cmd_READ_OCR(SDState *sd,
SDRequest req)
return sd_r3;
}
+/* CMD59 */
+static sd_rsp_type_t spi_cmd_CRC_ON_OFF(SDState *sd, SDRequest req)
+{
+ return sd_r1;
+}
+
static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
{
uint64_t addr;
@@ -1750,9 +1756,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
SDRequest req)
}
break;
- case 59: /* CMD59: CRC_ON_OFF (SPI) */
- return sd_r1;
-
default:
qemu_log_mask(LOG_GUEST_ERROR, "SD: Unknown CMD%i\n", req.cmd);
return sd_illegal;
@@ -2330,6 +2333,7 @@ static const SDProto sd_proto_spi = {
[55] = {8, sd_spi, "APP_CMD", sd_cmd_APP_CMD},
[57] = {10, sd_spi, "DIRECT_SECURE_WRITE", sd_cmd_optional},
[58] = {0, sd_spi, "READ_OCR", spi_cmd_READ_OCR},
+ [59] = {0, sd_spi, "CRC_ON_OFF", spi_cmd_CRC_ON_OFF},
},
.acmd = {
[41] = {8, sd_spi, "SEND_OP_COND", spi_cmd_SEND_OP_COND},
--
2.41.0
- [PULL 50/67] hw/sd/sdcard: Add sd_cmd_READ_SINGLE_BLOCK handler (CMD17), (continued)
- [PULL 50/67] hw/sd/sdcard: Add sd_cmd_READ_SINGLE_BLOCK handler (CMD17), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 52/67] hw/sd/sdcard: Add sd_cmd_PROGRAM_CSD handler (CMD27), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 51/67] hw/sd/sdcard: Add sd_cmd_WRITE_SINGLE_BLOCK handler (CMD24), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 53/67] hw/sd/sdcard: Add sd_cmd_SET/CLR_WRITE_PROT handler (CMD28 & CMD29), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 54/67] hw/sd/sdcard: Add sd_cmd_SEND_WRITE_PROT handler (CMD30), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 55/67] hw/sd/sdcard: Add sd_cmd_ERASE_WR_BLK_START/END handlers (CMD32 & CMD33), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 56/67] hw/sd/sdcard: Add sd_cmd_ERASE handler (CMD38), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 57/67] hw/sd/sdcard: Add sd_cmd_LOCK_UNLOCK handler (CMD42), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 58/67] hw/sd/sdcard: Add sd_cmd_APP_CMD handler (CMD55), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 59/67] hw/sd/sdcard: Add spi_cmd_READ_OCR handler (CMD58), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 60/67] hw/sd/sdcard: Add spi_cmd_CRC_ON_OFF handler (CMD59),
Philippe Mathieu-Daudé <=
- [PULL 61/67] hw/sd/sdcard: Add sd_acmd_SET_BUS_WIDTH handler (ACMD6), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 62/67] hw/sd/sdcard: Add sd_acmd_SD_STATUS handler (ACMD13), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 64/67] hw/sd/sdcard: Add sd_acmd_SET_WR_BLK_ERASE_COUNT handler (ACMD23), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 63/67] hw/sd/sdcard: Add sd_acmd_SEND_NUM_WR_BLOCKS handler (ACMD22), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 65/67] hw/sd/sdcard: Add sd_acmd_SD_APP_OP_COND handler (ACMD41), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 66/67] hw/sd/sdcard: Add sd_acmd_SET_CLR_CARD_DETECT handler (ACMD42), Philippe Mathieu-Daudé, 2024/07/02
- [PULL 67/67] hw/sd/sdcard: Add sd_acmd_SEND_SCR handler (ACMD51), Philippe Mathieu-Daudé, 2024/07/02
- Re: [PULL 00/67] SD/MMC patches for 2024-07-02, Richard Henderson, 2024/07/02