Skip to content

Commit 6fb0106

Browse files
saschahauergregkh
authored andcommitted
mmc: sdhci-esdhc-imx: Propagate ESDHC_FLAG_HS400* only on 8bit bus
commit 1ed5c3b upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 73e3901 commit 6fb0106

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
@@ -1643,20 +1643,26 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
16431643
host->mmc_host_ops.execute_tuning = usdhc_execute_tuning;
16441644
}
16451645

1646+
err = sdhci_esdhc_imx_probe_dt(pdev, host, imx_data);
1647+
if (err)
1648+
goto disable_ahb_clk;
1649+
16461650
if (imx_data->socdata->flags & ESDHC_FLAG_MAN_TUNING)
16471651
sdhci_esdhc_ops.platform_execute_tuning =
16481652
esdhc_executing_tuning;
16491653

16501654
if (imx_data->socdata->flags & ESDHC_FLAG_ERR004536)
16511655
host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
16521656

1653-
if (imx_data->socdata->flags & ESDHC_FLAG_HS400)
1657+
if (host->caps & MMC_CAP_8_BIT_DATA &&
1658+
imx_data->socdata->flags & ESDHC_FLAG_HS400)
16541659
host->mmc->caps2 |= MMC_CAP2_HS400;
16551660

16561661
if (imx_data->socdata->flags & ESDHC_FLAG_BROKEN_AUTO_CMD23)
16571662
host->quirks2 |= SDHCI_QUIRK2_ACMD23_BROKEN;
16581663

1659-
if (imx_data->socdata->flags & ESDHC_FLAG_HS400_ES) {
1664+
if (host->caps & MMC_CAP_8_BIT_DATA &&
1665+
imx_data->socdata->flags & ESDHC_FLAG_HS400_ES) {
16601666
host->mmc->caps2 |= MMC_CAP2_HS400_ES;
16611667
host->mmc_host_ops.hs400_enhanced_strobe =
16621668
esdhc_hs400_enhanced_strobe;
@@ -1678,10 +1684,6 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
16781684
goto disable_ahb_clk;
16791685
}
16801686

1681-
err = sdhci_esdhc_imx_probe_dt(pdev, host, imx_data);
1682-
if (err)
1683-
goto disable_ahb_clk;
1684-
16851687
sdhci_esdhc_imx_hwinit(host);
16861688

16871689
err = sdhci_add_host(host);

0 commit comments

Comments
 (0)