From: Cédric Le Goater <c...@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org> Signed-off-by: Cédric Le Goater <c...@kaod.org> [PMD: Use aspeed_emmc_kludge] Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> --- hw/sd/sd.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c index dc692fe1fa..f875fcd741 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1218,7 +1218,13 @@ static sd_rsp_type_t emmc_cmd_SEND_OP_COND(SDState *sd, SDRequest req) static sd_rsp_type_t sd_cmd_ALL_SEND_CID(SDState *sd, SDRequest req) { switch (sd->state) { + case sd_idle_state: + if (!sd->aspeed_emmc_kludge) { + return sd_invalid_state_for_cmd(sd, req); + } + /* fall-through */ case sd_ready_state: + /* Bus always won */ sd->state = sd_identification_state; return sd_r2_i; default: -- 2.41.0