diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-06-12 23:39:08 +0200 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-07-02 10:08:32 +0200 |
commit | 95e9305bf9422781ba10fbb327e4b5e13aa1e450 (patch) | |
tree | 3191bd488beaa92651321b286554cabb00ef8343 /hw | |
parent | 8aaae7fd191cdb7f72d2d8956d92d3acaf7cd7a4 (diff) |
hw/sd/sdcard: Add spi_cmd_CRC_ON_OFF handler (CMD59)
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>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/sd/sd.c | 10 |
1 files 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}, |