diff options
author | Dong Aisheng <aisheng.dong@nxp.com> | 2017-05-11 20:38:17 +0800 |
---|---|---|
committer | Anson Huang <Anson.Huang@nxp.com> | 2017-06-09 22:20:19 +0800 |
commit | 0478c79da5d886205702ea35e38d0c5b2ef7a93d (patch) | |
tree | 1338e9317ee5f233f0af8de6538f0a4640f5c557 /drivers/mmc/host | |
parent | 0c58ada525f70cd6b04a2ed8ceda7b8bc9c5beef (diff) |
MLK-14774 mmc: sdhci-esdhc-imx: restore pins state after suspend
After commit 3e3274ab9ff3 ("mmc: sdhci-esdhc-imx: Use common
sdhci_suspend|resume_host()"), we lost the pins state store and save
in common sdhci_pltfm_{suspend|resume} API which results in the
pins state lost in state un-retainable suspend/resume, then
CMD transfer will meet timeout subsequently.
Due to sdhci_pltfm_{suspend|resume} API becomes static after
that commit later, we then do manual pins state save and restore
in our platform suspend/resume API instead.
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Diffstat (limited to 'drivers/mmc/host')
-rw-r--r-- | drivers/mmc/host/sdhci-esdhc-imx.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci-esdhc-imx.c b/drivers/mmc/host/sdhci-esdhc-imx.c index 4f5ee6a86254..69967212be12 100644 --- a/drivers/mmc/host/sdhci-esdhc-imx.c +++ b/drivers/mmc/host/sdhci-esdhc-imx.c @@ -1442,6 +1442,7 @@ static int sdhci_esdhc_suspend(struct device *dev) struct sdhci_host *host = dev_get_drvdata(dev); struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); struct pltfm_imx_data *imx_data = sdhci_pltfm_priv(pltfm_host); + int ret; #ifdef CONFIG_PM pm_runtime_get_sync(host->mmc->parent); @@ -1453,7 +1454,11 @@ static int sdhci_esdhc_suspend(struct device *dev) mmc_retune_needed(host->mmc); } - return sdhci_suspend_host(host); + ret = sdhci_suspend_host(host); + + pinctrl_pm_select_sleep_state(dev); + + return ret; } static int sdhci_esdhc_resume(struct device *dev) @@ -1461,6 +1466,8 @@ static int sdhci_esdhc_resume(struct device *dev) struct sdhci_host *host = dev_get_drvdata(dev); int ret; + pinctrl_pm_select_default_state(dev); + /* re-initialize hw state in case it's lost in low power mode */ sdhci_esdhc_imx_hwinit(host); |