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

sdcard: simplify SEND_IF_COND (CMD8)

replace switch(single case) -> if()
Signed-off-by: NPhilippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: NAlistair Francis <alistair.francis@xilinx.com>
Message-id: 20180215221325.7611-16-f4bug@amsat.org
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 31162800
......@@ -1008,8 +1008,9 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
case 8: /* CMD8: SEND_IF_COND */
/* Physical Layer Specification Version 2.00 command */
switch (sd->state) {
case sd_idle_state:
if (sd->state != sd_idle_state) {
break;
}
sd->vhs = 0;
/* No response if not exactly one VHS bit is set. */
......@@ -1021,11 +1022,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd,
sd->vhs = req.arg;
return sd_r7;
default:
break;
}
break;
case 9: /* CMD9: SEND_CSD */
switch (sd->state) {
case sd_standby_state:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册