mmc: sdhci-esdhc-imx: advertise HS400 mode through MMC caps
authorLucas Stach <l.stach@pengutronix.de>
Mon, 10 May 2021 19:03:59 +0000 (21:03 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 14 Jun 2021 11:57:39 +0000 (13:57 +0200)
Instead of having an indirection through the SDHCI layer and emulating
a capability bit, that isn't there in hardware, do the same same thing
as with HS400_ES and advertise the support for HS400 directly through
the MMC caps.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Link: https://lore.kernel.org/r/20210510190400.105162-2-l.stach@pengutronix.de
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-esdhc-imx.c

index b991cf0..fba4a96 100644 (file)
@@ -427,9 +427,6 @@ static u32 esdhc_readl_le(struct sdhci_host *host, int reg)
                                        | FIELD_PREP(SDHCI_RETUNING_MODE_MASK,
                                                     SDHCI_TUNING_MODE_3);
 
-                       if (imx_data->socdata->flags & ESDHC_FLAG_HS400)
-                               val |= SDHCI_SUPPORT_HS400;
-
                        /*
                         * Do not advertise faster UHS modes if there are no
                         * pinctrl states for 100MHz/200MHz.
@@ -1591,7 +1588,7 @@ static int sdhci_esdhc_imx_probe(struct platform_device *pdev)
                host->quirks |= SDHCI_QUIRK_BROKEN_ADMA;
 
        if (imx_data->socdata->flags & ESDHC_FLAG_HS400)
-               host->quirks2 |= SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400;
+               host->mmc->caps2 |= MMC_CAP2_HS400;
 
        if (imx_data->socdata->flags & ESDHC_FLAG_BROKEN_AUTO_CMD23)
                host->quirks2 |= SDHCI_QUIRK2_ACMD23_BROKEN;