Skip to content

Commit 1ed5c3b

Browse files
saschahauerstorulf
authored andcommitted
mmc: sdhci-esdhc-imx: Propagate ESDHC_FLAG_HS400* only on 8bit bus
The core issues the warning "drop HS400 support since no 8-bit bus" when one of the ESDHC_FLAG_HS400* flags is set on a non 8bit capable host. To avoid this warning set these flags only on hosts that actually can do 8bit, i.e. have bus-width = <8> set in the device tree. Signed-off-by: Sascha Hauer <[email protected]> Reviewed-by: Haibo Chen <[email protected]> Fixes: 029e247 ("mmc: sdhci-esdhc-imx: add HS400_ES support for i.MX8QXP") Cc: [email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent 339e3eb commit 1ed5c3b

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

drivers/mmc/host/sdhci-esdhc-imx.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1660,20 +1660,26 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
16601660
host->mmc_host_ops.execute_tuning = usdhc_execute_tuning;
16611661
}
16621662

1663+
err = sdhci_esdhc_imx_probe_dt(pdev, host, imx_data);
1664+
if (err)
1665+
goto disable_ahb_clk;
1666+
16631667
if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING)
16641668
sdhci_esdhc_ops.platform_execute_tuning =
16651669
esdhc_executing_tuning;
16661670

16671671
if (imx_data->socdata->flags & ESDHC_FLAG_ERR004536)
16681672
host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
16691673

1670-
if (imx_data->socdata->flags & ESDHC_FLAG_HS400)
1674+
if (host->caps & MMC_CAP_8_BIT_DATA &&
1675+
imx_data->socdata->flags & ESDHC_FLAG_HS400)
16711676
host->mmc->caps2 |= MMC_CAP2_HS400;
16721677

16731678
if (imx_data->socdata->flags & ESDHC_FLAG_BROKEN_AUTO_CMD23)
16741679
host->quirks2 |= SDHCI_QUIRK2_ACMD23_BROKEN;
16751680

1676-
if (imx_data->socdata->flags & ESDHC_FLAG_HS400_ES) {
1681+
if (host->caps & MMC_CAP_8_BIT_DATA &&
1682+
imx_data->socdata->flags & ESDHC_FLAG_HS400_ES) {
16771683
host->mmc->caps2 |= MMC_CAP2_HS400_ES;
16781684
host->mmc_host_ops.hs400_enhanced_strobe =
16791685
esdhc_hs400_enhanced_strobe;
@@ -1695,10 +1701,6 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
16951701
goto disable_ahb_clk;
16961702
}
16971703

1698-
err = sdhci_esdhc_imx_probe_dt(pdev, host, imx_data);
1699-
if (err)
1700-
goto disable_ahb_clk;
1701-
17021704
sdhci_esdhc_imx_hwinit(host);
17031705

17041706
err = sdhci_add_host(host);

0 commit comments

Comments
 (0)