]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mmc: tmio: enforce retune after runtime suspend
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 29 Jan 2020 20:37:07 +0000 (21:37 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 24 Mar 2020 13:35:38 +0000 (14:35 +0100)
Currently, select_tuning() is called after RPM resume. But
select_tuning() needs some additional function calls to work correctly.
Instead of reimplementing the whole postprocessing, just enforce
retuning.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20200129203709.30493-5-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/renesas_sdhi_core.c
drivers/mmc/host/tmio_mmc.h
drivers/mmc/host/tmio_mmc_core.c

index 24ee8ac1fe218f613643c70d83c3cd12c9a3d04f..0c9e5e010bda3102ac850aa77fd76a2b5e77e9a3 100644 (file)
@@ -898,7 +898,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
                        dev_warn(&host->pdev->dev, "Unknown clock rate for tuning\n");
 
                host->execute_tuning = renesas_sdhi_execute_tuning;
-               host->select_tuning = renesas_sdhi_select_tuning;
                host->check_retune = renesas_sdhi_check_scc_error;
                host->prepare_hs400_tuning =
                        renesas_sdhi_prepare_hs400_tuning;
index bdb9973981ffcde318fb6912aebfb7f099b01a05..b6fffd3d2650a077b63117bdab722929389fa539 100644 (file)
@@ -183,7 +183,6 @@ struct tmio_mmc_host {
         * and mandatory for SDR104.
         */
        int (*execute_tuning)(struct tmio_mmc_host *host, u32 opcode);
-       int (*select_tuning)(struct tmio_mmc_host *host);
 
        /* Tuning values: 1 for success, 0 for failure */
        DECLARE_BITMAP(taps, BITS_PER_BYTE * sizeof(long));
index 9bb58c5b67689e787627a5a57fe4bdd95a7a5340..d18ee2fae746c5ade5d4d23bc33e7818a9976297 100644 (file)
@@ -1300,11 +1300,6 @@ int tmio_mmc_host_runtime_suspend(struct device *dev)
 }
 EXPORT_SYMBOL_GPL(tmio_mmc_host_runtime_suspend);
 
-static bool tmio_mmc_can_retune(struct tmio_mmc_host *host)
-{
-       return host->tap_num && mmc_can_retune(host->mmc);
-}
-
 int tmio_mmc_host_runtime_resume(struct device *dev)
 {
        struct tmio_mmc_host *host = dev_get_drvdata(dev);
@@ -1321,8 +1316,7 @@ int tmio_mmc_host_runtime_resume(struct device *dev)
 
        tmio_mmc_enable_dma(host, true);
 
-       if (tmio_mmc_can_retune(host) && host->select_tuning(host))
-               dev_warn(&host->pdev->dev, "Tuning selection failed\n");
+       mmc_retune_needed(host->mmc);
 
        return 0;
 }