[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 27/32] sdcard: use a more descriptive label 'unimplem
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 27/32] sdcard: use a more descriptive label 'unimplemented_spi_cmd' |
Date: |
Thu, 22 Feb 2018 15:23:02 +0000 |
From: Philippe Mathieu-Daudé <address@hidden>
Suggested-by: Alistair Francis <address@hidden>
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
Reviewed-by: Alistair Francis <address@hidden>
Message-id: address@hidden
Signed-off-by: Peter Maydell <address@hidden>
---
hw/sd/sd.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index f13f33efca..34080f0e4c 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -1179,8 +1179,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
/* Block write commands (Class 4) */
case 24: /* CMD24: WRITE_SINGLE_BLOCK */
- if (sd->spi)
- goto unimplemented_cmd;
+ if (sd->spi) {
+ goto unimplemented_spi_cmd;
+ }
switch (sd->state) {
case sd_transfer_state:
/* Writing in SPI mode not implemented. */
@@ -1205,8 +1206,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
break;
case 25: /* CMD25: WRITE_MULTIPLE_BLOCK */
- if (sd->spi)
- goto unimplemented_cmd;
+ if (sd->spi) {
+ goto unimplemented_spi_cmd;
+ }
switch (sd->state) {
case sd_transfer_state:
/* Writing in SPI mode not implemented. */
@@ -1246,8 +1248,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
break;
case 27: /* CMD27: PROGRAM_CSD */
- if (sd->spi)
- goto unimplemented_cmd;
+ if (sd->spi) {
+ goto unimplemented_spi_cmd;
+ }
switch (sd->state) {
case sd_transfer_state:
sd->state = sd_receivingdata_state;
@@ -1357,8 +1360,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
/* Lock card commands (Class 7) */
case 42: /* CMD42: LOCK_UNLOCK */
- if (sd->spi)
- goto unimplemented_cmd;
+ if (sd->spi) {
+ goto unimplemented_spi_cmd;
+ }
switch (sd->state) {
case sd_transfer_state:
sd->state = sd_receivingdata_state;
@@ -1409,7 +1413,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
qemu_log_mask(LOG_GUEST_ERROR, "SD: Unknown CMD%i\n", req.cmd);
return sd_illegal;
- unimplemented_cmd:
+ 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);
--
2.16.1
- [Qemu-devel] [PULL 23/32] sdcard: use the correct masked OCR in the R3 reply, (continued)
- [Qemu-devel] [PULL 23/32] sdcard: use the correct masked OCR in the R3 reply, Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 22/32] sdcard: simplify using the ldst API, Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 25/32] sdcard: handle CMD54 (SDIO), Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 24/32] sdcard: use the registerfields API for the CARD_STATUS register masks, Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 26/32] sdcard: handle the Security Specification commands, Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 28/32] sdcard: handles more commands in SPI mode, Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 29/32] sdcard: check the card is in correct state for APP CMD (CMD55), Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 32/32] sdcard: simplify SD_SEND_OP_COND (ACMD41), Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 30/32] sdcard: warn if host uses an incorrect address for APP CMD (CMD55), Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 31/32] sdcard: simplify SEND_IF_COND (CMD8), Peter Maydell, 2018/02/22
- [Qemu-devel] [PULL 27/32] sdcard: use a more descriptive label 'unimplemented_spi_cmd',
Peter Maydell <=
- Re: [Qemu-devel] [PULL 00/32] target-arm queue, Peter Maydell, 2018/02/23