qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] hw/sd/sdcard: Deprecate support for spec v1.10
@ 2024-06-27  7:10 Philippe Mathieu-Daudé
  2024-06-27  7:10 ` [PATCH 1/3] " Philippe Mathieu-Daudé
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-27  7:10 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, qemu-block, Cédric Le Goater,
	devel, Bin Meng, Sai Pavan Boddu, Joel Stanley

Deprecate SD spec v1.10, use v3.01 as new default.

Philippe Mathieu-Daudé (3):
  hw/sd/sdcard: Deprecate support for spec v1.10
  hw/sd/sdcard: Use spec v3.01 by default
  hw/sd/sdcard: Remove support for spec v1.10

 docs/about/removed-features.rst |  5 +++++
 include/hw/sd/sd.h              |  1 -
 hw/sd/sd.c                      | 14 +++-----------
 3 files changed, 8 insertions(+), 12 deletions(-)

-- 
2.41.0



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] hw/sd/sdcard: Deprecate support for spec v1.10
  2024-06-27  7:10 [PATCH 0/3] hw/sd/sdcard: Deprecate support for spec v1.10 Philippe Mathieu-Daudé
@ 2024-06-27  7:10 ` Philippe Mathieu-Daudé
  2024-06-27  7:55   ` Cédric Le Goater
  2024-06-27  7:10 ` [PATCH 2/3] hw/sd/sdcard: Use spec v3.01 by default Philippe Mathieu-Daudé
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-27  7:10 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, qemu-block, Cédric Le Goater,
	devel, Bin Meng, Sai Pavan Boddu, Joel Stanley

We use the v2.00 spec by default since commit 2f0939c234
("sdcard: Add a 'spec_version' property, default to Spec v2.00").
Time to deprecate the v1.10 which doesn't bring much, and
is not tested.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 docs/about/deprecated.rst | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index ff3da68208..02cdef14aa 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -362,6 +362,12 @@ recommending to switch to their stable counterparts:
 - "Zve64f" should be replaced with "zve64f"
 - "Zve64d" should be replaced with "zve64d"
 
+``-device sd-card,spec_version=1`` (since 9.1)
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+SD physical layer specification v2.00 supersedes the v1.10 one.
+v2.00 is the default since QEMU 3.0.0.
+
 Block device options
 ''''''''''''''''''''
 
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] hw/sd/sdcard: Use spec v3.01 by default
  2024-06-27  7:10 [PATCH 0/3] hw/sd/sdcard: Deprecate support for spec v1.10 Philippe Mathieu-Daudé
  2024-06-27  7:10 ` [PATCH 1/3] " Philippe Mathieu-Daudé
@ 2024-06-27  7:10 ` Philippe Mathieu-Daudé
  2024-06-27  7:55   ` Cédric Le Goater
  2024-06-27  7:10 ` [PATCH-for-10.0 3/3] hw/sd/sdcard: Remove support for spec v1.10 Philippe Mathieu-Daudé
  2025-09-02 10:14 ` [PATCH 0/3] hw/sd/sdcard: Deprecate " Philippe Mathieu-Daudé
  3 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-27  7:10 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, qemu-block, Cédric Le Goater,
	devel, Bin Meng, Sai Pavan Boddu, Joel Stanley

Recent SDHCI expect cards to support the v3.01 spec
to negociate lower I/O voltage. Select it by default.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/sd/sd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index a48010cfc1..d0a1d5db18 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -2280,7 +2280,7 @@ static void sd_realize(DeviceState *dev, Error **errp)
 
 static Property sd_properties[] = {
     DEFINE_PROP_UINT8("spec_version", SDState,
-                      spec_version, SD_PHY_SPECv2_00_VERS),
+                      spec_version, SD_PHY_SPECv3_01_VERS),
     DEFINE_PROP_DRIVE("drive", SDState, blk),
     /* We do not model the chip select pin, so allow the board to select
      * whether card should be in SSI or MMC/SD mode.  It is also up to the
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH-for-10.0 3/3] hw/sd/sdcard: Remove support for spec v1.10
  2024-06-27  7:10 [PATCH 0/3] hw/sd/sdcard: Deprecate support for spec v1.10 Philippe Mathieu-Daudé
  2024-06-27  7:10 ` [PATCH 1/3] " Philippe Mathieu-Daudé
  2024-06-27  7:10 ` [PATCH 2/3] hw/sd/sdcard: Use spec v3.01 by default Philippe Mathieu-Daudé
@ 2024-06-27  7:10 ` Philippe Mathieu-Daudé
  2025-09-01  7:29   ` Philippe Mathieu-Daudé
  2025-09-02 10:14 ` [PATCH 0/3] hw/sd/sdcard: Deprecate " Philippe Mathieu-Daudé
  3 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-06-27  7:10 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, qemu-block, Cédric Le Goater,
	devel, Bin Meng, Sai Pavan Boddu, Joel Stanley

Support for spec v1.10 was deprecated in QEMU v9.1.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 docs/about/deprecated.rst       |  6 ------
 docs/about/removed-features.rst |  5 +++++
 include/hw/sd/sd.h              |  1 -
 hw/sd/sd.c                      | 12 ++----------
 4 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
index 02cdef14aa..ff3da68208 100644
--- a/docs/about/deprecated.rst
+++ b/docs/about/deprecated.rst
@@ -362,12 +362,6 @@ recommending to switch to their stable counterparts:
 - "Zve64f" should be replaced with "zve64f"
 - "Zve64d" should be replaced with "zve64d"
 
-``-device sd-card,spec_version=1`` (since 9.1)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-SD physical layer specification v2.00 supersedes the v1.10 one.
-v2.00 is the default since QEMU 3.0.0.
-
 Block device options
 ''''''''''''''''''''
 
diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
index fc7b28e637..dfe04b0555 100644
--- a/docs/about/removed-features.rst
+++ b/docs/about/removed-features.rst
@@ -1056,6 +1056,11 @@ by using ``-machine graphics=off``.
 
 The 'pvrdma' device and the whole RDMA subsystem have been removed.
 
+``-device sd-card,spec_version=1`` (since 10.0)
+'''''''''''''''''''''''''''''''''''''''''''''''
+
+SD physical layer specification v2.00 supersedes the v1.10 one.
+
 Related binaries
 ----------------
 
diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h
index 2c8748fb9b..362e149360 100644
--- a/include/hw/sd/sd.h
+++ b/include/hw/sd/sd.h
@@ -56,7 +56,6 @@
 #define AKE_SEQ_ERROR           (1 << 3)
 
 enum SDPhySpecificationVersion {
-    SD_PHY_SPECv1_10_VERS     = 1,
     SD_PHY_SPECv2_00_VERS     = 2,
     SD_PHY_SPECv3_01_VERS     = 3,
 };
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index d0a1d5db18..37a6a989ee 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -168,7 +168,6 @@ static bool sd_is_spi(SDState *sd)
 static const char *sd_version_str(enum SDPhySpecificationVersion version)
 {
     static const char *sdphy_version[] = {
-        [SD_PHY_SPECv1_10_VERS]     = "v1.10",
         [SD_PHY_SPECv2_00_VERS]     = "v2.00",
         [SD_PHY_SPECv3_01_VERS]     = "v3.01",
     };
@@ -371,11 +370,7 @@ static void sd_set_ocr(SDState *sd)
 static void sd_set_scr(SDState *sd)
 {
     sd->scr[0] = 0 << 4;        /* SCR structure version 1.0 */
-    if (sd->spec_version == SD_PHY_SPECv1_10_VERS) {
-        sd->scr[0] |= 1;        /* Spec Version 1.10 */
-    } else {
-        sd->scr[0] |= 2;        /* Spec Version 2.00 or Version 3.0X */
-    }
+    sd->scr[0] |= 2;            /* Spec Version 2.00 or Version 3.0X */
     sd->scr[1] = (2 << 4)       /* SDSC Card (Security Version 1.01) */
                  | 0b0101;      /* 1-bit or 4-bit width bus modes */
     sd->scr[2] = 0x00;          /* Extended Security is not supported. */
@@ -1241,9 +1236,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
         break;
 
     case 8:  /* CMD8:   SEND_IF_COND */
-        if (sd->spec_version < SD_PHY_SPECv2_00_VERS) {
-            break;
-        }
         if (sd->state != sd_idle_state) {
             break;
         }
@@ -2231,7 +2223,7 @@ static void sd_realize(DeviceState *dev, Error **errp)
     int ret;
 
     switch (sd->spec_version) {
-    case SD_PHY_SPECv1_10_VERS
+    case SD_PHY_SPECv2_00_VERS
      ... SD_PHY_SPECv3_01_VERS:
         break;
     default:
-- 
2.41.0



^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] hw/sd/sdcard: Deprecate support for spec v1.10
  2024-06-27  7:10 ` [PATCH 1/3] " Philippe Mathieu-Daudé
@ 2024-06-27  7:55   ` Cédric Le Goater
  0 siblings, 0 replies; 10+ messages in thread
From: Cédric Le Goater @ 2024-06-27  7:55 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-block, Cédric Le Goater, devel, Bin Meng,
	Sai Pavan Boddu, Joel Stanley

On 6/27/24 9:10 AM, Philippe Mathieu-Daudé wrote:
> We use the v2.00 spec by default since commit 2f0939c234
> ("sdcard: Add a 'spec_version' property, default to Spec v2.00").
> Time to deprecate the v1.10 which doesn't bring much, and
> is not tested.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.


> ---
>   docs/about/deprecated.rst | 6 ++++++
>   1 file changed, 6 insertions(+)
> 
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index ff3da68208..02cdef14aa 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -362,6 +362,12 @@ recommending to switch to their stable counterparts:
>   - "Zve64f" should be replaced with "zve64f"
>   - "Zve64d" should be replaced with "zve64d"
>   
> +``-device sd-card,spec_version=1`` (since 9.1)
> +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> +
> +SD physical layer specification v2.00 supersedes the v1.10 one.
> +v2.00 is the default since QEMU 3.0.0.
> +
>   Block device options
>   ''''''''''''''''''''
>   



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] hw/sd/sdcard: Use spec v3.01 by default
  2024-06-27  7:10 ` [PATCH 2/3] hw/sd/sdcard: Use spec v3.01 by default Philippe Mathieu-Daudé
@ 2024-06-27  7:55   ` Cédric Le Goater
  0 siblings, 0 replies; 10+ messages in thread
From: Cédric Le Goater @ 2024-06-27  7:55 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: qemu-block, Cédric Le Goater, devel, Bin Meng,
	Sai Pavan Boddu, Joel Stanley

On 6/27/24 9:10 AM, Philippe Mathieu-Daudé wrote:
> Recent SDHCI expect cards to support the v3.01 spec
> to negociate lower I/O voltage. Select it by default.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>


Reviewed-by: Cédric Le Goater <clg@redhat.com>

Thanks,

C.

	
> ---
>   hw/sd/sd.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index a48010cfc1..d0a1d5db18 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -2280,7 +2280,7 @@ static void sd_realize(DeviceState *dev, Error **errp)
>   
>   static Property sd_properties[] = {
>       DEFINE_PROP_UINT8("spec_version", SDState,
> -                      spec_version, SD_PHY_SPECv2_00_VERS),
> +                      spec_version, SD_PHY_SPECv3_01_VERS),
>       DEFINE_PROP_DRIVE("drive", SDState, blk),
>       /* We do not model the chip select pin, so allow the board to select
>        * whether card should be in SSI or MMC/SD mode.  It is also up to the



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH-for-10.0 3/3] hw/sd/sdcard: Remove support for spec v1.10
  2024-06-27  7:10 ` [PATCH-for-10.0 3/3] hw/sd/sdcard: Remove support for spec v1.10 Philippe Mathieu-Daudé
@ 2025-09-01  7:29   ` Philippe Mathieu-Daudé
  2025-09-01  7:41     ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-09-01  7:29 UTC (permalink / raw)
  To: qemu-devel, Thomas Huth
  Cc: qemu-block, Cédric Le Goater, devel, Bin Meng,
	Sai Pavan Boddu, Joel Stanley

Kind ping :)

On 27/6/24 09:10, Philippe Mathieu-Daudé wrote:
> Support for spec v1.10 was deprecated in QEMU v9.1.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   docs/about/deprecated.rst       |  6 ------
>   docs/about/removed-features.rst |  5 +++++
>   include/hw/sd/sd.h              |  1 -
>   hw/sd/sd.c                      | 12 ++----------
>   4 files changed, 7 insertions(+), 17 deletions(-)
> 
> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
> index 02cdef14aa..ff3da68208 100644
> --- a/docs/about/deprecated.rst
> +++ b/docs/about/deprecated.rst
> @@ -362,12 +362,6 @@ recommending to switch to their stable counterparts:
>   - "Zve64f" should be replaced with "zve64f"
>   - "Zve64d" should be replaced with "zve64d"
>   
> -``-device sd-card,spec_version=1`` (since 9.1)
> -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> -
> -SD physical layer specification v2.00 supersedes the v1.10 one.
> -v2.00 is the default since QEMU 3.0.0.
> -
>   Block device options
>   ''''''''''''''''''''
>   
> diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst
> index fc7b28e637..dfe04b0555 100644
> --- a/docs/about/removed-features.rst
> +++ b/docs/about/removed-features.rst
> @@ -1056,6 +1056,11 @@ by using ``-machine graphics=off``.
>   
>   The 'pvrdma' device and the whole RDMA subsystem have been removed.
>   
> +``-device sd-card,spec_version=1`` (since 10.0)
> +'''''''''''''''''''''''''''''''''''''''''''''''
> +
> +SD physical layer specification v2.00 supersedes the v1.10 one.
> +
>   Related binaries
>   ----------------
>   
> diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h
> index 2c8748fb9b..362e149360 100644
> --- a/include/hw/sd/sd.h
> +++ b/include/hw/sd/sd.h
> @@ -56,7 +56,6 @@
>   #define AKE_SEQ_ERROR           (1 << 3)
>   
>   enum SDPhySpecificationVersion {
> -    SD_PHY_SPECv1_10_VERS     = 1,
>       SD_PHY_SPECv2_00_VERS     = 2,
>       SD_PHY_SPECv3_01_VERS     = 3,
>   };
> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
> index d0a1d5db18..37a6a989ee 100644
> --- a/hw/sd/sd.c
> +++ b/hw/sd/sd.c
> @@ -168,7 +168,6 @@ static bool sd_is_spi(SDState *sd)
>   static const char *sd_version_str(enum SDPhySpecificationVersion version)
>   {
>       static const char *sdphy_version[] = {
> -        [SD_PHY_SPECv1_10_VERS]     = "v1.10",
>           [SD_PHY_SPECv2_00_VERS]     = "v2.00",
>           [SD_PHY_SPECv3_01_VERS]     = "v3.01",
>       };
> @@ -371,11 +370,7 @@ static void sd_set_ocr(SDState *sd)
>   static void sd_set_scr(SDState *sd)
>   {
>       sd->scr[0] = 0 << 4;        /* SCR structure version 1.0 */
> -    if (sd->spec_version == SD_PHY_SPECv1_10_VERS) {
> -        sd->scr[0] |= 1;        /* Spec Version 1.10 */
> -    } else {
> -        sd->scr[0] |= 2;        /* Spec Version 2.00 or Version 3.0X */
> -    }
> +    sd->scr[0] |= 2;            /* Spec Version 2.00 or Version 3.0X */
>       sd->scr[1] = (2 << 4)       /* SDSC Card (Security Version 1.01) */
>                    | 0b0101;      /* 1-bit or 4-bit width bus modes */
>       sd->scr[2] = 0x00;          /* Extended Security is not supported. */
> @@ -1241,9 +1236,6 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, SDRequest req)
>           break;
>   
>       case 8:  /* CMD8:   SEND_IF_COND */
> -        if (sd->spec_version < SD_PHY_SPECv2_00_VERS) {
> -            break;
> -        }
>           if (sd->state != sd_idle_state) {
>               break;
>           }
> @@ -2231,7 +2223,7 @@ static void sd_realize(DeviceState *dev, Error **errp)
>       int ret;
>   
>       switch (sd->spec_version) {
> -    case SD_PHY_SPECv1_10_VERS
> +    case SD_PHY_SPECv2_00_VERS
>        ... SD_PHY_SPECv3_01_VERS:
>           break;
>       default:



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH-for-10.0 3/3] hw/sd/sdcard: Remove support for spec v1.10
  2025-09-01  7:29   ` Philippe Mathieu-Daudé
@ 2025-09-01  7:41     ` Philippe Mathieu-Daudé
  2025-09-02 10:03       ` Philippe Mathieu-Daudé
  0 siblings, 1 reply; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-09-01  7:41 UTC (permalink / raw)
  To: qemu-devel, Thomas Huth
  Cc: qemu-block, Cédric Le Goater, devel, Bin Meng,
	Sai Pavan Boddu, Joel Stanley

On 1/9/25 09:29, Philippe Mathieu-Daudé wrote:
> Kind ping :)
> 
> On 27/6/24 09:10, Philippe Mathieu-Daudé wrote:
>> Support for spec v1.10 was deprecated in QEMU v9.1.
>>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>> ---
>>   docs/about/deprecated.rst       |  6 ------
>>   docs/about/removed-features.rst |  5 +++++
>>   include/hw/sd/sd.h              |  1 -
>>   hw/sd/sd.c                      | 12 ++----------
>>   4 files changed, 7 insertions(+), 17 deletions(-)
>>
>> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
>> index 02cdef14aa..ff3da68208 100644
>> --- a/docs/about/deprecated.rst
>> +++ b/docs/about/deprecated.rst
>> @@ -362,12 +362,6 @@ recommending to switch to their stable counterparts:
>>   - "Zve64f" should be replaced with "zve64f"
>>   - "Zve64d" should be replaced with "zve64d"
>> -``-device sd-card,spec_version=1`` (since 9.1)
>> -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> -
>> -SD physical layer specification v2.00 supersedes the v1.10 one.
>> -v2.00 is the default since QEMU 3.0.0.
>> -
>>   Block device options
>>   ''''''''''''''''''''
>> diff --git a/docs/about/removed-features.rst b/docs/about/removed- 
>> features.rst
>> index fc7b28e637..dfe04b0555 100644
>> --- a/docs/about/removed-features.rst
>> +++ b/docs/about/removed-features.rst
>> @@ -1056,6 +1056,11 @@ by using ``-machine graphics=off``.
>>   The 'pvrdma' device and the whole RDMA subsystem have been removed.
>> +``-device sd-card,spec_version=1`` (since 10.0)

Updated to "10.2".

>> +'''''''''''''''''''''''''''''''''''''''''''''''
>> +
>> +SD physical layer specification v2.00 supersedes the v1.10 one.
>> +
>>   Related binaries
>>   ----------------
>> diff --git a/include/hw/sd/sd.h b/include/hw/sd/sd.h
>> index 2c8748fb9b..362e149360 100644
>> --- a/include/hw/sd/sd.h
>> +++ b/include/hw/sd/sd.h
>> @@ -56,7 +56,6 @@
>>   #define AKE_SEQ_ERROR           (1 << 3)
>>   enum SDPhySpecificationVersion {
>> -    SD_PHY_SPECv1_10_VERS     = 1,
>>       SD_PHY_SPECv2_00_VERS     = 2,
>>       SD_PHY_SPECv3_01_VERS     = 3,
>>   };
>> diff --git a/hw/sd/sd.c b/hw/sd/sd.c
>> index d0a1d5db18..37a6a989ee 100644
>> --- a/hw/sd/sd.c
>> +++ b/hw/sd/sd.c
>> @@ -168,7 +168,6 @@ static bool sd_is_spi(SDState *sd)
>>   static const char *sd_version_str(enum SDPhySpecificationVersion 
>> version)
>>   {
>>       static const char *sdphy_version[] = {
>> -        [SD_PHY_SPECv1_10_VERS]     = "v1.10",
>>           [SD_PHY_SPECv2_00_VERS]     = "v2.00",
>>           [SD_PHY_SPECv3_01_VERS]     = "v3.01",
>>       };
>> @@ -371,11 +370,7 @@ static void sd_set_ocr(SDState *sd)
>>   static void sd_set_scr(SDState *sd)
>>   {
>>       sd->scr[0] = 0 << 4;        /* SCR structure version 1.0 */
>> -    if (sd->spec_version == SD_PHY_SPECv1_10_VERS) {
>> -        sd->scr[0] |= 1;        /* Spec Version 1.10 */
>> -    } else {
>> -        sd->scr[0] |= 2;        /* Spec Version 2.00 or Version 3.0X */
>> -    }
>> +    sd->scr[0] |= 2;            /* Spec Version 2.00 or Version 3.0X */
>>       sd->scr[1] = (2 << 4)       /* SDSC Card (Security Version 1.01) */
>>                    | 0b0101;      /* 1-bit or 4-bit width bus modes */
>>       sd->scr[2] = 0x00;          /* Extended Security is not 
>> supported. */
>> @@ -1241,9 +1236,6 @@ static sd_rsp_type_t sd_normal_command(SDState 
>> *sd, SDRequest req)
>>           break;
>>       case 8:  /* CMD8:   SEND_IF_COND */
>> -        if (sd->spec_version < SD_PHY_SPECv2_00_VERS) {
>> -            break;
>> -        }
>>           if (sd->state != sd_idle_state) {
>>               break;
>>           }
>> @@ -2231,7 +2223,7 @@ static void sd_realize(DeviceState *dev, Error 
>> **errp)
>>       int ret;
>>       switch (sd->spec_version) {
>> -    case SD_PHY_SPECv1_10_VERS
>> +    case SD_PHY_SPECv2_00_VERS
>>        ... SD_PHY_SPECv3_01_VERS:
>>           break;
>>       default:
> 



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH-for-10.0 3/3] hw/sd/sdcard: Remove support for spec v1.10
  2025-09-01  7:41     ` Philippe Mathieu-Daudé
@ 2025-09-02 10:03       ` Philippe Mathieu-Daudé
  0 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-09-02 10:03 UTC (permalink / raw)
  To: qemu-devel, Pierrick Bouvier
  Cc: qemu-block, Thomas Huth, Cédric Le Goater, devel, Bin Meng,
	Sai Pavan Boddu, Joel Stanley

On 1/9/25 09:41, Philippe Mathieu-Daudé wrote:
> On 1/9/25 09:29, Philippe Mathieu-Daudé wrote:
>> Kind ping :)
>>
>> On 27/6/24 09:10, Philippe Mathieu-Daudé wrote:
>>> Support for spec v1.10 was deprecated in QEMU v9.1.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
>>> ---
>>>   docs/about/deprecated.rst       |  6 ------
>>>   docs/about/removed-features.rst |  5 +++++
>>>   include/hw/sd/sd.h              |  1 -
>>>   hw/sd/sd.c                      | 12 ++----------
>>>   4 files changed, 7 insertions(+), 17 deletions(-)
>>>
>>> diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst
>>> index 02cdef14aa..ff3da68208 100644
>>> --- a/docs/about/deprecated.rst
>>> +++ b/docs/about/deprecated.rst
>>> @@ -362,12 +362,6 @@ recommending to switch to their stable 
>>> counterparts:
>>>   - "Zve64f" should be replaced with "zve64f"
>>>   - "Zve64d" should be replaced with "zve64d"
>>> -``-device sd-card,spec_version=1`` (since 9.1)
>>> -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> -
>>> -SD physical layer specification v2.00 supersedes the v1.10 one.
>>> -v2.00 is the default since QEMU 3.0.0.
>>> -
>>>   Block device options
>>>   ''''''''''''''''''''
>>> diff --git a/docs/about/removed-features.rst b/docs/about/removed- 
>>> features.rst
>>> index fc7b28e637..dfe04b0555 100644
>>> --- a/docs/about/removed-features.rst
>>> +++ b/docs/about/removed-features.rst
>>> @@ -1056,6 +1056,11 @@ by using ``-machine graphics=off``.
>>>   The 'pvrdma' device and the whole RDMA subsystem have been removed.
>>> +``-device sd-card,spec_version=1`` (since 10.0)
> 
> Updated to "10.2".

As discussed with Pierrick during online review:

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 0/3] hw/sd/sdcard: Deprecate support for spec v1.10
  2024-06-27  7:10 [PATCH 0/3] hw/sd/sdcard: Deprecate support for spec v1.10 Philippe Mathieu-Daudé
                   ` (2 preceding siblings ...)
  2024-06-27  7:10 ` [PATCH-for-10.0 3/3] hw/sd/sdcard: Remove support for spec v1.10 Philippe Mathieu-Daudé
@ 2025-09-02 10:14 ` Philippe Mathieu-Daudé
  3 siblings, 0 replies; 10+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-09-02 10:14 UTC (permalink / raw)
  To: qemu-devel
  Cc: qemu-block, Cédric Le Goater, devel, Bin Meng,
	Sai Pavan Boddu, Joel Stanley

On 27/6/24 09:10, Philippe Mathieu-Daudé wrote:
> Deprecate SD spec v1.10, use v3.01 as new default.
> 
> Philippe Mathieu-Daudé (3):
>    hw/sd/sdcard: Deprecate support for spec v1.10
>    hw/sd/sdcard: Use spec v3.01 by default

The first 2 patches are already merged,

>    hw/sd/sdcard: Remove support for spec v1.10
queuing the last one.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-02 10:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-27  7:10 [PATCH 0/3] hw/sd/sdcard: Deprecate support for spec v1.10 Philippe Mathieu-Daudé
2024-06-27  7:10 ` [PATCH 1/3] " Philippe Mathieu-Daudé
2024-06-27  7:55   ` Cédric Le Goater
2024-06-27  7:10 ` [PATCH 2/3] hw/sd/sdcard: Use spec v3.01 by default Philippe Mathieu-Daudé
2024-06-27  7:55   ` Cédric Le Goater
2024-06-27  7:10 ` [PATCH-for-10.0 3/3] hw/sd/sdcard: Remove support for spec v1.10 Philippe Mathieu-Daudé
2025-09-01  7:29   ` Philippe Mathieu-Daudé
2025-09-01  7:41     ` Philippe Mathieu-Daudé
2025-09-02 10:03       ` Philippe Mathieu-Daudé
2025-09-02 10:14 ` [PATCH 0/3] hw/sd/sdcard: Deprecate " Philippe Mathieu-Daudé

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).