[PATCH v2 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support

ziniu.wang_1@nxp.com posted 4 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v2 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support
Posted by ziniu.wang_1@nxp.com 1 month, 1 week ago
From: Luke Wang <ziniu.wang_1@nxp.com>

Add sdhci_get_property() call to parse common SDHCI DT properties,
including "bus-width = <1>" which sets SDHCI_QUIRK_FORCE_1_BIT_DATA
quirk for 1-bit data bus width configuration.

Remove the duplicate "no-1-8-v" property parsing since
sdhci_get_property() already handles it.

Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>
---
 drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
index 97461e20425d..b607d4ffc562 100644
--- a/drivers/mmc/host/sdhci-esdhc-imx.c
+++ b/drivers/mmc/host/sdhci-esdhc-imx.c
@@ -1813,8 +1813,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 
 	of_property_read_u32(np, "fsl,strobe-dll-delay-target",
 				&boarddata->strobe_dll_delay_target);
-	if (of_property_read_bool(np, "no-1-8-v"))
-		host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
 
 	if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
 		boarddata->delay_line = 0;
@@ -1833,6 +1831,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
 	if (ret)
 		return ret;
 
+	sdhci_get_property(pdev);
+
 	/* HS400/HS400ES require 8 bit bus */
 	if (!(host->mmc->caps & MMC_CAP_8_BIT_DATA))
 		host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
-- 
2.34.1
Re: [PATCH v2 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support
Posted by Adrian Hunter 4 weeks, 1 day ago
On 03/03/2026 12:50, ziniu.wang_1@nxp.com wrote:
> From: Luke Wang <ziniu.wang_1@nxp.com>
> 
> Add sdhci_get_property() call to parse common SDHCI DT properties,
> including "bus-width = <1>" which sets SDHCI_QUIRK_FORCE_1_BIT_DATA
> quirk for 1-bit data bus width configuration.
> 
> Remove the duplicate "no-1-8-v" property parsing since
> sdhci_get_property() already handles it.
> 
> Signed-off-by: Luke Wang <ziniu.wang_1@nxp.com>

Acked-by: Adrian Hunter <adrian.hunter@intel.com>

> ---
>  drivers/mmc/host/sdhci-esdhc-imx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c
> index 97461e20425d..b607d4ffc562 100644
> --- a/drivers/mmc/host/sdhci-esdhc-imx.c
> +++ b/drivers/mmc/host/sdhci-esdhc-imx.c
> @@ -1813,8 +1813,6 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  
>  	of_property_read_u32(np, "fsl,strobe-dll-delay-target",
>  				&boarddata->strobe_dll_delay_target);
> -	if (of_property_read_bool(np, "no-1-8-v"))
> -		host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;
>  
>  	if (of_property_read_u32(np, "fsl,delay-line", &boarddata->delay_line))
>  		boarddata->delay_line = 0;
> @@ -1833,6 +1831,8 @@ sdhci_esdhc_imx_probe_dt(struct platform_device *pdev,
>  	if (ret)
>  		return ret;
>  
> +	sdhci_get_property(pdev);
> +
>  	/* HS400/HS400ES require 8 bit bus */
>  	if (!(host->mmc->caps & MMC_CAP_8_BIT_DATA))
>  		host->mmc->caps2 &= ~(MMC_CAP2_HS400 | MMC_CAP2_HS400_ES);
Re: [PATCH v2 2/4] mmc: sdhci-esdhc-imx: add 1-bit bus width support
Posted by Frank Li 1 month ago
From: Frank Li (AI-BOT) <frank.li@nxp.com>

> +	sdhci_get_property(pdev);
> +

Missing argument: sdhci_get_property() expects (struct sdhci_host *host)
as second parameter, not just pdev. Check function signature in
sdhci.h.

> -	if (of_property_read_bool(np, "no-1-8-v"))
> -		host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V;

Removal looks correct if sdhci_get_property() truly handles "no-1-8-v"
internally. Verify this is documented in the commit message or code
comment to avoid future confusion.

> diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c
> index 97461e20425d..b607d4ffc562 100644

Line length at hunk context appears OK (under 80 chars).

---

AI bot review and may be useless.