mirror of https://github.com/xqemu/xqemu.git
sdcard: simplify SEND_IF_COND (CMD8)
replace switch(single case) -> if() Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Alistair Francis <alistair.francis@xilinx.com> Message-id: 20180215221325.7611-16-f4bug@amsat.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
3116280040
commit
ad0ade5547
10
hw/sd/sd.c
10
hw/sd/sd.c
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue