mirror of https://gitee.com/openkylin/qemu.git
sdcard: remove commands from unsupported old MMC specification
This device does not model MMCA Specification previous to v4.2 Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: 20180215221325.7611-6-f4bug@amsat.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
9b7ec55c5c
commit
0aad4fdfd4
33
hw/sd/sd.c
33
hw/sd/sd.c
|
@ -1037,24 +1037,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
|
|||
}
|
||||
break;
|
||||
|
||||
case 11: /* CMD11: READ_DAT_UNTIL_STOP */
|
||||
if (sd->spi)
|
||||
goto bad_cmd;
|
||||
switch (sd->state) {
|
||||
case sd_transfer_state:
|
||||
sd->state = sd_sendingdata_state;
|
||||
sd->data_start = req.arg;
|
||||
sd->data_offset = 0;
|
||||
|
||||
if (sd->data_start + sd->blk_len > sd->size)
|
||||
sd->card_status |= ADDRESS_ERROR;
|
||||
return sd_r0;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 12: /* CMD12: STOP_TRANSMISSION */
|
||||
switch (sd->state) {
|
||||
case sd_sendingdata_state:
|
||||
|
@ -1862,21 +1844,6 @@ uint8_t sd_read_data(SDState *sd)
|
|||
sd->state = sd_transfer_state;
|
||||
break;
|
||||
|
||||
case 11: /* CMD11: READ_DAT_UNTIL_STOP */
|
||||
if (sd->data_offset == 0)
|
||||
BLK_READ_BLOCK(sd->data_start, io_len);
|
||||
ret = sd->data[sd->data_offset ++];
|
||||
|
||||
if (sd->data_offset >= io_len) {
|
||||
sd->data_start += io_len;
|
||||
sd->data_offset = 0;
|
||||
if (sd->data_start + io_len > sd->size) {
|
||||
sd->card_status |= ADDRESS_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case 13: /* ACMD13: SD_STATUS */
|
||||
ret = sd->sd_status[sd->data_offset ++];
|
||||
|
||||
|
|
Loading…
Reference in New Issue