[PATCH v2] mmc: fsl_esdhc: Do not set UHS_CAPS based on CONFIG_MMC_UHS_SUPPORT

Fabio Estevam festevam at gmail.com
Tue Apr 11 15:41:25 CEST 2023


From: Fabio Estevam <festevam at denx.de>

Since commit 1a7904fdfa7d ("mmc: fsl_esdhc_imx: Use esdhc_soc_data flags
to set host caps") the following SD card error is observed on an imx7d-sdb
board:

U-Boot 2023.04-00652-g487e42f7bc5e (Apr 05 2023 - 22:14:21 -0300)

CPU:   Freescale i.MX7D rev1.0 1000 MHz (running at 792 MHz)
CPU:   Commercial temperature grade (0C to 95C) at 35C
Reset cause: POR
Model: Freescale i.MX7 SabreSD Board
Board: i.MX7D SABRESD in non-secure mode
DRAM:  1 GiB
Core:  100 devices, 19 uclasses, devicetree: separate
PMIC: PFUZE3000 DEV_ID=0x30 REV_ID=0x10
MMC:   FSL_SDHC: 0, FSL_SDHC: 1, FSL_SDHC: 2
Loading Environment from MMC... Card did not respond to voltage select! : -110
*** Warning - No block device, using default environment

Setting UHS_CAPS only based on the CONFIG_MMC_UHS_SUPPORT config
option is not correct because UHS_CAPS has the following definition:

 #define UHS_CAPS (MMC_CAP(UHS_SDR12) | MMC_CAP(UHS_SDR25) | \
		   MMC_CAP(UHS_SDR50) | MMC_CAP(UHS_SDR104) | \
		   MMC_CAP(UHS_DDR50))

and the SD card may not necessarily support all these modes.

Remove the UHS_CAPS setting to fix the SD card regression.

Fixes: 1a7904fdfa7d ("mmc: fsl_esdhc_imx: Use esdhc_soc_data flags to set host caps")
Signed-off-by: Fabio Estevam <festevam at denx.de>
---
Changes since v1:
- Remove setting UHS_CAPS completely.

 drivers/mmc/fsl_esdhc_imx.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 66caf683f7..5e7d9f41b6 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -1258,13 +1258,6 @@ static int fsl_esdhc_init(struct fsl_esdhc_priv *priv,
 			esdhc_write32(&regs->tuning_ctrl, val);
 		}
 
-		/*
-		 * UHS doesn't have explicit ESDHC flags, so if it's
-		 * not supported, disable it in config.
-		 */
-		if (CONFIG_IS_ENABLED(MMC_UHS_SUPPORT))
-			cfg->host_caps |= UHS_CAPS;
-
 		if (CONFIG_IS_ENABLED(MMC_HS200_SUPPORT)) {
 			if (priv->flags & ESDHC_FLAG_HS200)
 				cfg->host_caps |= MMC_CAP(MMC_HS_200);
-- 
2.34.1



More information about the U-Boot mailing list