Commit a86bf70b authored by Wolfram Sang's avatar Wolfram Sang Committed by Ulf Hansson

mmc: tmio: enforce retune after runtime suspend

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: default avatarYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20200129203709.30493-5-wsa+renesas@sang-engineering.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 64982b9f
...@@ -898,7 +898,6 @@ int renesas_sdhi_probe(struct platform_device *pdev, ...@@ -898,7 +898,6 @@ int renesas_sdhi_probe(struct platform_device *pdev,
dev_warn(&host->pdev->dev, "Unknown clock rate for tuning\n"); dev_warn(&host->pdev->dev, "Unknown clock rate for tuning\n");
host->execute_tuning = renesas_sdhi_execute_tuning; host->execute_tuning = renesas_sdhi_execute_tuning;
host->select_tuning = renesas_sdhi_select_tuning;
host->check_retune = renesas_sdhi_check_scc_error; host->check_retune = renesas_sdhi_check_scc_error;
host->prepare_hs400_tuning = host->prepare_hs400_tuning =
renesas_sdhi_prepare_hs400_tuning; renesas_sdhi_prepare_hs400_tuning;
......
...@@ -183,7 +183,6 @@ struct tmio_mmc_host { ...@@ -183,7 +183,6 @@ struct tmio_mmc_host {
* and mandatory for SDR104. * and mandatory for SDR104.
*/ */
int (*execute_tuning)(struct tmio_mmc_host *host, u32 opcode); 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 */ /* Tuning values: 1 for success, 0 for failure */
DECLARE_BITMAP(taps, BITS_PER_BYTE * sizeof(long)); DECLARE_BITMAP(taps, BITS_PER_BYTE * sizeof(long));
......
...@@ -1300,11 +1300,6 @@ int tmio_mmc_host_runtime_suspend(struct device *dev) ...@@ -1300,11 +1300,6 @@ int tmio_mmc_host_runtime_suspend(struct device *dev)
} }
EXPORT_SYMBOL_GPL(tmio_mmc_host_runtime_suspend); 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) int tmio_mmc_host_runtime_resume(struct device *dev)
{ {
struct tmio_mmc_host *host = dev_get_drvdata(dev); struct tmio_mmc_host *host = dev_get_drvdata(dev);
...@@ -1321,8 +1316,7 @@ int tmio_mmc_host_runtime_resume(struct device *dev) ...@@ -1321,8 +1316,7 @@ int tmio_mmc_host_runtime_resume(struct device *dev)
tmio_mmc_enable_dma(host, true); tmio_mmc_enable_dma(host, true);
if (tmio_mmc_can_retune(host) && host->select_tuning(host)) mmc_retune_needed(host->mmc);
dev_warn(&host->pdev->dev, "Tuning selection failed\n");
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment