Skip to contentSkip to conversation

hw/sd: sdhci: Enable 64-bit system bus capability in the default SD/MMC host controller

PATCH In review Joanne Koong 3 participants 5 messages Jun 23, 2021 – Jul 6, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/sd: sdhci: Enable 64-bit system bus capability in the default SD/MMC host controller

The default SD/MMC host controller uses SD spec v2.00. 64-bit system bus capability was added in v2.

In this change, we arrive at 0x157834b4 by computing (0x057834b4 | (1ul << 28)) where 28 represents the BUS64BIT SDHC_CAPAB field.

---
 hw/sd/sdhci-internal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/sd/sdhci-internal.h +2 -2
index e8c753d6d1..a76fc704e5 100644
@@ -316,16 +316,16 @@ extern const VMStateDescription sdhci_vmstate;
  * - 3.3v and 1.8v voltages
  * - SDMA/ADMA1/ADMA2
  * - high-speed
+ * - 64-bit system bus
  * max host controller R/W buffers size: 512B
  * max clock frequency for SDclock: 52 MHz
  * timeout clock frequency: 52 MHz
  *
  * does not support:
  * - 3.0v voltage
- * - 64-bit system bus
  * - suspend/resume
  */
-#define SDHC_CAPAB_REG_DEFAULT 0x057834b4
+#define SDHC_CAPAB_REG_DEFAULT 0x157834b4
 
 #define DEFINE_SDHCI_COMMON_PROPERTIES(_state) \
     DEFINE_PROP_UINT8("sd-spec-version", _state, sd_spec_version, 2), \
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw

Hi Joanne,

Next time I recommend you to Cc the maintainers, otherwise they might miss your patch. See:
https://wiki.qemu.org/Contribute/SubmitAPatch#CC_the_relevant_maintainer

$ ./scripts/get_maintainer.pl -f hw/sd/sdhci-internal.h
"Philippe Mathieu-Daudé" <[email protected]> (odd fixer:SD (Secure Card))
Bin Meng <[email protected]> (odd fixer:SD (Secure Card))
[email protected] (open list:SD (Secure Card))
[email protected] (open list:All patches CC here)
Quoted 25 lines · Joanne Koong

The default SD/MMC host controller uses SD spec v2.00. 64-bit system bus capability was added in v2.

In this change, we arrive at 0x157834b4 by computing (0x057834b4 | (1ul << 28)) where 28 represents the BUS64BIT SDHC_CAPAB field.

---
 hw/sd/sdhci-internal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
hw/sd/sdhci-internal.h +1 -0
index e8c753d6d1..a76fc704e5 100644
@@ -316,16 +316,16 @@ extern const VMStateDescription sdhci_vmstate;
  * - 3.3v and 1.8v voltages
  * - SDMA/ADMA1/ADMA2
  * - high-speed
+ * - 64-bit system bus
  * max host controller R/W buffers size: 512B
  * max clock frequency for SDclock: 52 MHz
  * timeout clock frequency: 52 MHz
  *

hw/sd/sdhci-internal.h extern const VMStateDescription sdhci_vmstate; · line 331

Quoted 10 lines
hw/sd/sdhci-internal.h +1 -2
  * does not support:
  * - 3.0v voltage
- * - 64-bit system bus
  * - suspend/resume
  */
-#define SDHC_CAPAB_REG_DEFAULT 0x057834b4
+#define SDHC_CAPAB_REG_DEFAULT 0x157834b4
 
 #define DEFINE_SDHCI_COMMON_PROPERTIES(_state) \
     DEFINE_PROP_UINT8("sd-spec-version", _state, sd_spec_version, 2), \
Reviewed-by on v1 1/1
#2 lore raw
In reply to Joanne Koong
Quoted 4 lines · Joanne Koong

The default SD/MMC host controller uses SD spec v2.00. 64-bit system bus capability was added in v2.

Quoted 8 lines

In this change, we arrive at 0x157834b4 by computing (0x057834b4 | (1ul << 28)) where 28 represents the BUS64BIT SDHC_CAPAB field.

---
 hw/sd/sdhci-internal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
#3 lore raw
In reply to Joanne Koong
Quoted 10 lines · Joanne Koong

The default SD/MMC host controller uses SD spec v2.00. 64-bit system bus capability was added in v2.

In this change, we arrive at 0x157834b4 by computing (0x057834b4 | (1ul << 28)) where 28 represents the BUS64BIT SDHC_CAPAB field.

---
 hw/sd/sdhci-internal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, series applied to sdmmc-next tree.

#4 lore raw

Awesome! Thank you, Philippe and Bin!

Quoted 16 lines · Philippe Mathieu-Daudé
Quoted 1 line · Joanne Koong

The default SD/MMC host controller uses SD spec v2.00. 64-bit system bus

capability

Quoted 3 lines

was added in v2.

In this change, we arrive at 0x157834b4 by computing (0x057834b4 | (1ul

<< 28))

Quoted 6 lines

where 28 represents the BUS64BIT SDHC_CAPAB field.

---
 hw/sd/sdhci-internal.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Thanks, series applied to sdmmc-next tree.