Skip to contentSkip to conversation

mmc: sdhci: Enable high speed conditional on the correspnding bit

PATCH New Faiz Abbas 2 participants 4 messages Jul 23, 2020 – Aug 20, 2020 MMC, SD and SDIO

lore
Share & tools
lore

Faiz Abbas

author
#0 lore raw

PATCH 1/1 mmc: sdhci: Enable high speed conditional on the correspnding bit

The capabilities register has a field to indicate whether the host supports high speed mode or not. Add high speed host_caps based on this bit instead of enabling it by default.

---
 drivers/mmc/sdhci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +4 -1
index 16989dcf05..48d639fe93 100644
@@ -866,7 +866,10 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
 	if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE)
 		cfg->voltages |= host->voltages;
 
-	cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
+	if (caps & SDHCI_CAN_DO_HISPD)
+		cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
+
+	cfg->host_caps |= MMC_MODE_4BIT;
 
 	/* Since Host Controller Version3.0 */
 	if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
Signature · 1 line
2.17.1
#1 lore raw

PATCH 1/1 mmc: sdhci: Enable high speed conditional on the correspnding bit

Hi,

?t 23. 7. 2020 v 6:12 odes?latel Faiz Abbas <[email protected]> napsal:

Quoted 27 lines

The capabilities register has a field to indicate whether the host supports high speed mode or not. Add high speed host_caps based on this bit instead of enabling it by default.

---
 drivers/mmc/sdhci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +4 -2
index 16989dcf05..48d639fe93 100644
@@ -866,7 +866,10 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
        if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE)
                cfg->voltages |= host->voltages;
 
-       cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
+       if (caps & SDHCI_CAN_DO_HISPD)
+               cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
+
+       cfg->host_caps |= MMC_MODE_4BIT;
 
        /* Since Host Controller Version3.0 */
        if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
--
Quoted 2 lines

2.17.1

sdhci-caps-mask = <0 0x200000>;)

Thanks,
Michal

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs
#2 lore raw

PATCH 1/1 mmc: sdhci: Enable high speed conditional on the correspnding bit

Hi Peng,

st 29. 7. 2020 v 17:07 odes?latel Michal Simek <[email protected]> napsal:

Quoted 36 lines

Hi,

?t 23. 7. 2020 v 6:12 odes?latel Faiz Abbas <[email protected]> napsal:

Quoted 27 lines

The capabilities register has a field to indicate whether the host supports high speed mode or not. Add high speed host_caps based on this bit instead of enabling it by default.

---
 drivers/mmc/sdhci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +4 -2
index 16989dcf05..48d639fe93 100644
@@ -866,7 +866,10 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
        if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE)
                cfg->voltages |= host->voltages;
 
-       cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
+       if (caps & SDHCI_CAN_DO_HISPD)
+               cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
+
+       cfg->host_caps |= MMC_MODE_4BIT;
 
        /* Since Host Controller Version3.0 */
        if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
--
Quoted 2 lines

2.17.1

Quoted 1 line

sdhci-caps-mask = <0 0x200000>;)

Peng: Can you please take this patch to your tree? Or I will take it.

Thanks,
Michal

#3 lore raw

PATCH 1/1 mmc: sdhci: Enable high speed conditional on the correspnding bit

Hi,

?t 13. 8. 2020 v 12:48 odes?latel Michal Simek <[email protected]> napsal:

Quoted 42 lines

Hi Peng,

st 29. 7. 2020 v 17:07 odes?latel Michal Simek <[email protected]> napsal:

Quoted 36 lines

Hi,

?t 23. 7. 2020 v 6:12 odes?latel Faiz Abbas <[email protected]> napsal:

Quoted 27 lines

The capabilities register has a field to indicate whether the host supports high speed mode or not. Add high speed host_caps based on this bit instead of enabling it by default.

---
 drivers/mmc/sdhci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/mmc/sdhci.c +4 -2
index 16989dcf05..48d639fe93 100644
@@ -866,7 +866,10 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
        if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE)
                cfg->voltages |= host->voltages;
 
-       cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
+       if (caps & SDHCI_CAN_DO_HISPD)
+               cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
+
+       cfg->host_caps |= MMC_MODE_4BIT;
 
        /* Since Host Controller Version3.0 */
        if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
--
Quoted 2 lines

2.17.1

Quoted 1 line

sdhci-caps-mask = <0 0x200000>;)

Quoted 1 line

Peng: Can you please take this patch to your tree? Or I will take it.

I applied this patch but I have fixed typo in subject.

M

Signature · 5 lines
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs