]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mmc: sdhci-esdhci-imx: re-initialize hw state after resume
authorDong Aisheng <aisheng.dong@nxp.com>
Tue, 12 Jul 2016 07:46:23 +0000 (15:46 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 25 Jul 2016 08:34:58 +0000 (10:34 +0200)
sdhci_esdhc_imx_hwinit() includes all basic hw intialization.
Calling it after resume to re-initialize hw in case its state
is already lost in low power mode.

Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-esdhc-imx.c

index c5adf4ba40667da3068c7df74c53bb6ef823a262..e5b5d1c3eb01e55f873ec90521e6f00e81c8a017 100644 (file)
@@ -1297,12 +1297,9 @@ static int sdhci_esdhc_suspend(struct device *dev)
 static int sdhci_esdhc_resume(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);
 
-       /* restore watermark setting in case it's lost in low power mode */
-       if (esdhc_is_usdhc(imx_data))
-               writel(ESDHC_WTMK_DEFAULT_VAL, host->ioaddr + ESDHC_WTMK_LVL);
+       /* re-initialize hw state in case it's lost in low power mode */
+       sdhci_esdhc_imx_hwinit(host);
 
        return sdhci_pltfm_resume(dev);
 }