mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-31 14:02:05 -06:00
sdcard: use a more descriptive label 'unimplemented_spi_cmd'
Suggested-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: 20180215221325.7611-12-f4bug@amsat.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
688491c71a
commit
a21208646d
1 changed files with 13 additions and 9 deletions
22
hw/sd/sd.c
22
hw/sd/sd.c
|
@ -1179,8 +1179,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
|
||||||
|
|
||||||
/* Block write commands (Class 4) */
|
/* Block write commands (Class 4) */
|
||||||
case 24: /* CMD24: WRITE_SINGLE_BLOCK */
|
case 24: /* CMD24: WRITE_SINGLE_BLOCK */
|
||||||
if (sd->spi)
|
if (sd->spi) {
|
||||||
goto unimplemented_cmd;
|
goto unimplemented_spi_cmd;
|
||||||
|
}
|
||||||
switch (sd->state) {
|
switch (sd->state) {
|
||||||
case sd_transfer_state:
|
case sd_transfer_state:
|
||||||
/* Writing in SPI mode not implemented. */
|
/* Writing in SPI mode not implemented. */
|
||||||
|
@ -1205,8 +1206,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 25: /* CMD25: WRITE_MULTIPLE_BLOCK */
|
case 25: /* CMD25: WRITE_MULTIPLE_BLOCK */
|
||||||
if (sd->spi)
|
if (sd->spi) {
|
||||||
goto unimplemented_cmd;
|
goto unimplemented_spi_cmd;
|
||||||
|
}
|
||||||
switch (sd->state) {
|
switch (sd->state) {
|
||||||
case sd_transfer_state:
|
case sd_transfer_state:
|
||||||
/* Writing in SPI mode not implemented. */
|
/* Writing in SPI mode not implemented. */
|
||||||
|
@ -1246,8 +1248,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 27: /* CMD27: PROGRAM_CSD */
|
case 27: /* CMD27: PROGRAM_CSD */
|
||||||
if (sd->spi)
|
if (sd->spi) {
|
||||||
goto unimplemented_cmd;
|
goto unimplemented_spi_cmd;
|
||||||
|
}
|
||||||
switch (sd->state) {
|
switch (sd->state) {
|
||||||
case sd_transfer_state:
|
case sd_transfer_state:
|
||||||
sd->state = sd_receivingdata_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) */
|
/* Lock card commands (Class 7) */
|
||||||
case 42: /* CMD42: LOCK_UNLOCK */
|
case 42: /* CMD42: LOCK_UNLOCK */
|
||||||
if (sd->spi)
|
if (sd->spi) {
|
||||||
goto unimplemented_cmd;
|
goto unimplemented_spi_cmd;
|
||||||
|
}
|
||||||
switch (sd->state) {
|
switch (sd->state) {
|
||||||
case sd_transfer_state:
|
case sd_transfer_state:
|
||||||
sd->state = sd_receivingdata_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);
|
qemu_log_mask(LOG_GUEST_ERROR, "SD: Unknown CMD%i\n", req.cmd);
|
||||||
return sd_illegal;
|
return sd_illegal;
|
||||||
|
|
||||||
unimplemented_cmd:
|
unimplemented_spi_cmd:
|
||||||
/* Commands that are recognised but not yet implemented in SPI mode. */
|
/* 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",
|
qemu_log_mask(LOG_UNIMP, "SD: CMD%i not implemented in SPI mode\n",
|
||||||
req.cmd);
|
req.cmd);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue