[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 04/22] hw/sd: sd: Support CMD59 for SPI mode
From: |
Bin Meng |
Subject: |
[PATCH 04/22] hw/sd: sd: Support CMD59 for SPI mode |
Date: |
Thu, 31 Dec 2020 19:29:52 +0800 |
From: Bin Meng <bin.meng@windriver.com>
After the card is put into SPI mode, CRC check for all commands
including CMD0 will be done according to CMD59 setting. But this
command is currently unimplemented. Simply allow the decoding of
CMD59, but the CRC check is still ignored.
Signed-off-by: Bin Meng <bin.meng@windriver.com>
---
hw/sd/sd.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 1842c03797..2036734da1 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1516,18 +1516,12 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
SDRequest req)
if (!sd->spi) {
goto bad_cmd;
}
- goto unimplemented_spi_cmd;
+ return sd_r1;
default:
bad_cmd:
qemu_log_mask(LOG_GUEST_ERROR, "SD: Unknown CMD%i\n", req.cmd);
return sd_illegal;
-
- unimplemented_spi_cmd:
- /* Commands that are recognised but not yet implemented in SPI mode.
*/
- qemu_log_mask(LOG_UNIMP, "SD: CMD%i not implemented in SPI mode\n",
- req.cmd);
- return sd_illegal;
}
qemu_log_mask(LOG_GUEST_ERROR, "SD: CMD%i in a wrong state\n", req.cmd);
--
2.25.1
- [PATCH 00/22] hw/riscv: sifive_u: Add missing SPI support, Bin Meng, 2020/12/31
- [PATCH 01/22] hw/block: m25p80: Add ISSI SPI flash support, Bin Meng, 2020/12/31
- [PATCH 02/22] hw/block: m25p80: Add various ISSI flash information, Bin Meng, 2020/12/31
- [PATCH 03/22] hw/sd: ssi-sd: Fix incorrect card response sequence, Bin Meng, 2020/12/31
- [PATCH 04/22] hw/sd: sd: Support CMD59 for SPI mode,
Bin Meng <=
- [PATCH 05/22] hw/sd: sd: Drop sd_crc16(), Bin Meng, 2020/12/31
- [PATCH 06/22] util: Add CRC16 (CCITT) calculation routines, Bin Meng, 2020/12/31
- [PATCH 07/22] hw/sd: ssi-sd: Suffix a data block with CRC16, Bin Meng, 2020/12/31
- [PATCH 08/22] hw/sd: ssi-sd: Support multiple block read (CMD18), Bin Meng, 2020/12/31
- [PATCH 09/22] hw/sd: ssi-sd: Use macros for the dummy value and tokens in the transfer, Bin Meng, 2020/12/31
- [PATCH 11/22] hw/sd: sd: Allow single/multiple block write for SPI mode, Bin Meng, 2020/12/31
- [PATCH 14/22] hw/sd: ssi-sd: Support single block write, Bin Meng, 2020/12/31
- [PATCH 10/22] hw/sd: sd: Remove duplicated codes in single/multiple block read/write, Bin Meng, 2020/12/31
- [PATCH 12/22] hw/sd: sd.h: Cosmetic change of using spaces, Bin Meng, 2020/12/31
- [PATCH 13/22] hw/sd: Introduce receive_ready() callback, Bin Meng, 2020/12/31