Merge "mmc: sdhci-msm: Disable controller clocks in suspend"
This commit is contained in:
commit
0a7b7fc131
1 changed files with 18 additions and 1 deletions
|
@ -2906,7 +2906,24 @@ out:
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void sdhci_msm_disable_controller_clock(struct sdhci_host *host)
|
||||||
|
{
|
||||||
|
struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
|
||||||
|
struct sdhci_msm_host *msm_host = pltfm_host->priv;
|
||||||
|
|
||||||
|
if (atomic_read(&msm_host->controller_clock)) {
|
||||||
|
if (!IS_ERR(msm_host->clk))
|
||||||
|
clk_disable_unprepare(msm_host->clk);
|
||||||
|
if (!IS_ERR(msm_host->pclk))
|
||||||
|
clk_disable_unprepare(msm_host->pclk);
|
||||||
|
if (!IS_ERR(msm_host->ice_clk))
|
||||||
|
clk_disable_unprepare(msm_host->ice_clk);
|
||||||
|
sdhci_msm_bus_voting(host, 0);
|
||||||
|
atomic_set(&msm_host->controller_clock, 0);
|
||||||
|
pr_debug("%s: %s: disabled controller clock\n",
|
||||||
|
mmc_hostname(host->mmc), __func__);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static int sdhci_msm_prepare_clocks(struct sdhci_host *host, bool enable)
|
static int sdhci_msm_prepare_clocks(struct sdhci_host *host, bool enable)
|
||||||
{
|
{
|
||||||
|
@ -4848,7 +4865,7 @@ static int sdhci_msm_suspend(struct device *dev)
|
||||||
}
|
}
|
||||||
ret = sdhci_msm_runtime_suspend(dev);
|
ret = sdhci_msm_runtime_suspend(dev);
|
||||||
out:
|
out:
|
||||||
|
sdhci_msm_disable_controller_clock(host);
|
||||||
if (host->mmc->card && mmc_card_sdio(host->mmc->card)) {
|
if (host->mmc->card && mmc_card_sdio(host->mmc->card)) {
|
||||||
sdio_cfg = sdhci_msm_cfg_sdio_wakeup(host, true);
|
sdio_cfg = sdhci_msm_cfg_sdio_wakeup(host, true);
|
||||||
if (sdio_cfg)
|
if (sdio_cfg)
|
||||||
|
|
Loading…
Add table
Reference in a new issue