mmc: sdhci-of-at91: add quirk for broken HS200 [Linux 4.19.70]

This Linux kernel change "mmc: sdhci-of-at91: add quirk for broken HS200" is included in the Linux 4.19.70 release. This change is authored by Eugen Hristev <eugen.hristev [at] microchip.com> on Thu Aug 8 08:35:40 2019 +0000. The commit for this change in Linux stable tree is 1ecc65e (patch) which is from upstream commit 7871aa6. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream 7871aa6.

mmc: sdhci-of-at91: add quirk for broken HS200

commit 7871aa60ae0086fe4626abdf5ed13eeddf306c61 upstream.

HS200 is not implemented in the driver, but the controller claims it
through caps. Remove it via a quirk, to make sure the mmc core do not try
to enable HS200, as it causes the eMMC initialization to fail.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Fixes: bb5f8ea4d514 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC")
Cc: stable@vger.kernel.org # v4.4+
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

There are 3 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/mmc/host/sdhci-of-at91.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/mmc/host/sdhci-of-at91.c b/drivers/mmc/host/sdhci-of-at91.c
index 682c573..e284102 100644
--- a/drivers/mmc/host/sdhci-of-at91.c
+++ b/drivers/mmc/host/sdhci-of-at91.c
@@ -365,6 +365,9 @@ static int sdhci_at91_probe(struct platform_device *pdev)
    pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
    pm_runtime_use_autosuspend(&pdev->dev);

+   /* HS200 is broken at this moment */
+   host->quirks2 = SDHCI_QUIRK2_BROKEN_HS200;
+
    ret = sdhci_add_host(host);
    if (ret)
        goto pm_runtime_disable;

Leave a Reply

Your email address will not be published. Required fields are marked *