diff mbox series

[5/8] hw/sd/ssi-sd: Force cards connected in SPI mode to use Spec v1.10

Message ID 20180603000827.30872-6-f4bug@amsat.org
State New
Headers show
Series [1/8] sdcard: Update the Configuration Register (SCR) to Spec Version 1.10 | expand

Commit Message

Philippe Mathieu-Daudé June 3, 2018, 12:08 a.m. UTC
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/sd/ssi-sd.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alistair Francis June 4, 2018, 6:26 p.m. UTC | #1
On Sat, Jun 2, 2018 at 5:08 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>

Can you add a justification for this in the commit message?

Alistair

> ---
>  hw/sd/ssi-sd.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
> index ae04b6641b..c62fdc871c 100644
> --- a/hw/sd/ssi-sd.c
> +++ b/hw/sd/ssi-sd.c
> @@ -253,6 +253,8 @@ static void ssi_sd_realize(SSISlave *d, Error **errp)
>      /* FIXME use a qdev drive property instead of drive_get_next() */
>      dinfo = drive_get_next(IF_SD);
>      carddev = qdev_create(&s->sdbus.qbus, TYPE_SD_CARD);
> +    object_property_set_uint(OBJECT(carddev),
> +                             SD_PHY_SPECv1_10_VERS, "spec_version", &err);
>      if (dinfo) {
>          qdev_prop_set_drive(carddev, "drive", blk_by_legacy_dinfo(dinfo), &err);
>      }
> --
> 2.17.1
>
>
Philippe Mathieu-Daudé June 7, 2018, 4:31 p.m. UTC | #2
On 06/04/2018 03:26 PM, Alistair Francis wrote:
> On Sat, Jun 2, 2018 at 5:08 PM, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> 
> Can you add a justification for this in the commit message?

Oops, I misplaced the justification in the following patch
(6/8: Disable SEND_IF_COND (CMD8) for Spec v1)

> 
> Alistair
> 
>> ---
>>  hw/sd/ssi-sd.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
>> index ae04b6641b..c62fdc871c 100644
>> --- a/hw/sd/ssi-sd.c
>> +++ b/hw/sd/ssi-sd.c
>> @@ -253,6 +253,8 @@ static void ssi_sd_realize(SSISlave *d, Error **errp)
>>      /* FIXME use a qdev drive property instead of drive_get_next() */
>>      dinfo = drive_get_next(IF_SD);
>>      carddev = qdev_create(&s->sdbus.qbus, TYPE_SD_CARD);
>> +    object_property_set_uint(OBJECT(carddev),
>> +                             SD_PHY_SPECv1_10_VERS, "spec_version", &err);
>>      if (dinfo) {
>>          qdev_prop_set_drive(carddev, "drive", blk_by_legacy_dinfo(dinfo), &err);
>>      }
>> --
>> 2.17.1
>>
>>
>
diff mbox series

Patch

diff --git a/hw/sd/ssi-sd.c b/hw/sd/ssi-sd.c
index ae04b6641b..c62fdc871c 100644
--- a/hw/sd/ssi-sd.c
+++ b/hw/sd/ssi-sd.c
@@ -253,6 +253,8 @@  static void ssi_sd_realize(SSISlave *d, Error **errp)
     /* FIXME use a qdev drive property instead of drive_get_next() */
     dinfo = drive_get_next(IF_SD);
     carddev = qdev_create(&s->sdbus.qbus, TYPE_SD_CARD);
+    object_property_set_uint(OBJECT(carddev),
+                             SD_PHY_SPECv1_10_VERS, "spec_version", &err);
     if (dinfo) {
         qdev_prop_set_drive(carddev, "drive", blk_by_legacy_dinfo(dinfo), &err);
     }