提交 d6911486 编写于 作者: P Philippe Mathieu-Daudé 提交者: Peter Maydell

sdcard: check the card is in correct state for APP CMD (CMD55)

Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-14-f4bug@amsat.org
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 946897ce
......@@ -1386,6 +1386,14 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
/* Application specific commands (Class 8) */
case 55: /* CMD55: APP_CMD */
switch (sd->state) {
case sd_ready_state:
case sd_identification_state:
case sd_inactive_state:
return sd_illegal;
default:
break;
}
if (!sd->spi) {
if (sd->rca != rca) {
return sd_r0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册