From: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Add support to Power up the card and send response r3 in case of MMC.
Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
[ clg: - ported on SDProto framework ]
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
hw/sd/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 7f07d0e99d15..be9d07126fd9 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -2410,8 +2410,8 @@ static const SDProto sd_proto_sd = {
static sd_rsp_type_t emmc_cmd_SEND_OP_CMD(SDState *sd, SDRequest req)
{
- sd->state = sd_ready_state;
- return sd_r3;
+ sd_ocr_powerup(sd);
+ return sd->state == sd_idle_state ? sd_r3 : sd_r0;
}
static sd_rsp_type_t emmc_cmd_ALL_SEND_CID(SDState *sd, SDRequest req)
--
2.41.0