|
@@ -458,11 +458,11 @@ static int sdhci_pxav3_runtime_suspend(struct device *dev)
|
|
struct sdhci_host *host = dev_get_drvdata(dev);
|
|
struct sdhci_host *host = dev_get_drvdata(dev);
|
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
|
struct sdhci_pxa *pxa = pltfm_host->priv;
|
|
struct sdhci_pxa *pxa = pltfm_host->priv;
|
|
- unsigned long flags;
|
|
|
|
|
|
+ int ret;
|
|
|
|
|
|
- spin_lock_irqsave(&host->lock, flags);
|
|
|
|
- host->runtime_suspended = true;
|
|
|
|
- spin_unlock_irqrestore(&host->lock, flags);
|
|
|
|
|
|
+ ret = sdhci_runtime_suspend_host(host);
|
|
|
|
+ if (ret)
|
|
|
|
+ return ret;
|
|
|
|
|
|
clk_disable_unprepare(pxa->clk_io);
|
|
clk_disable_unprepare(pxa->clk_io);
|
|
if (!IS_ERR(pxa->clk_core))
|
|
if (!IS_ERR(pxa->clk_core))
|
|
@@ -476,17 +476,12 @@ static int sdhci_pxav3_runtime_resume(struct device *dev)
|
|
struct sdhci_host *host = dev_get_drvdata(dev);
|
|
struct sdhci_host *host = dev_get_drvdata(dev);
|
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
|
struct sdhci_pxa *pxa = pltfm_host->priv;
|
|
struct sdhci_pxa *pxa = pltfm_host->priv;
|
|
- unsigned long flags;
|
|
|
|
|
|
|
|
clk_prepare_enable(pxa->clk_io);
|
|
clk_prepare_enable(pxa->clk_io);
|
|
if (!IS_ERR(pxa->clk_core))
|
|
if (!IS_ERR(pxa->clk_core))
|
|
clk_prepare_enable(pxa->clk_core);
|
|
clk_prepare_enable(pxa->clk_core);
|
|
|
|
|
|
- spin_lock_irqsave(&host->lock, flags);
|
|
|
|
- host->runtime_suspended = false;
|
|
|
|
- spin_unlock_irqrestore(&host->lock, flags);
|
|
|
|
-
|
|
|
|
- return 0;
|
|
|
|
|
|
+ return sdhci_runtime_resume_host(host);
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|