diff mbox series

[15/32] hw/sd: Add emmc_cmd_SEND_OP_CMD() handler

Message ID 20230703132509.2474225-16-clg@kaod.org
State New
Headers show
Series hw/sd: eMMC support | expand

Commit Message

Cédric Le Goater July 3, 2023, 1:24 p.m. UTC
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 hw/sd/sd.c | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Philippe Mathieu-Daudé June 3, 2024, 12:25 p.m. UTC | #1
On 3/7/23 15:24, Cédric Le Goater wrote:
> Signed-off-by: Cédric Le Goater <clg@kaod.org>
> ---
>   hw/sd/sd.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index 409fbbcbd8d7..f846440b737a 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -2171,10 +2171,17 @@ static const SDProto sd_proto_sd = {
>       },
>   };
>   
> +static sd_rsp_type_t emmc_cmd_SEND_OP_CMD(SDState *sd, SDRequest req)

"emmc_cmd_SEND_OP_COND" I suppose?

> +{
> +    sd->state = sd_ready_state;
> +    return sd_r3;
> +}
> +
>   static const SDProto sd_proto_emmc = {
>       .name = "eMMC",
>       .cmd = {
>           [0]         = sd_cmd_GO_IDLE_STATE,
> +        [1]         = emmc_cmd_SEND_OP_CMD,
>           [5]         = sd_cmd_illegal,
>           [19]        = sd_cmd_SEND_TUNING_BLOCK,
>           [23]        = sd_cmd_SET_BLOCK_COUNT,
Philippe Mathieu-Daudé June 3, 2024, 12:27 p.m. UTC | #2
On 3/6/24 14:25, Philippe Mathieu-Daudé wrote:
> On 3/7/23 15:24, Cédric Le Goater wrote:
>> Signed-off-by: Cédric Le Goater <clg@kaod.org>
>> ---
>>   hw/sd/sd.c | 7 +++++++
>>   1 file changed, 7 insertions(+)
>>
>> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
>> index 409fbbcbd8d7..f846440b737a 100644
>> --- a/hw/sd/sd.c
>> +++ b/hw/sd/sd.c
>> @@ -2171,10 +2171,17 @@ static const SDProto sd_proto_sd = {
>>       },
>>   };
>> +static sd_rsp_type_t emmc_cmd_SEND_OP_CMD(SDState *sd, SDRequest req)
> 
> "emmc_cmd_SEND_OP_COND" I suppose?

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

>> +{
>> +    sd->state = sd_ready_state;
>> +    return sd_r3;
>> +}
>> +
>>   static const SDProto sd_proto_emmc = {
>>       .name = "eMMC",
>>       .cmd = {
>>           [0]         = sd_cmd_GO_IDLE_STATE,
>> +        [1]         = emmc_cmd_SEND_OP_CMD,
>>           [5]         = sd_cmd_illegal,
>>           [19]        = sd_cmd_SEND_TUNING_BLOCK,
>>           [23]        = sd_cmd_SET_BLOCK_COUNT,
>
diff mbox series

Patch

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 409fbbcbd8d7..f846440b737a 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -2171,10 +2171,17 @@  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;
+}
+
 static const SDProto sd_proto_emmc = {
     .name = "eMMC",
     .cmd = {
         [0]         = sd_cmd_GO_IDLE_STATE,
+        [1]         = emmc_cmd_SEND_OP_CMD,
         [5]         = sd_cmd_illegal,
         [19]        = sd_cmd_SEND_TUNING_BLOCK,
         [23]        = sd_cmd_SET_BLOCK_COUNT,