aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/mmci.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 3094ea3ed722..b43e1ab5cb5c 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -1614,8 +1614,37 @@ static int mmci_resume(struct device *dev)
1614} 1614}
1615#endif 1615#endif
1616 1616
1617#ifdef CONFIG_PM_RUNTIME
1618static int mmci_runtime_suspend(struct device *dev)
1619{
1620 struct amba_device *adev = to_amba_device(dev);
1621 struct mmc_host *mmc = amba_get_drvdata(adev);
1622
1623 if (mmc) {
1624 struct mmci_host *host = mmc_priv(mmc);
1625 clk_disable_unprepare(host->clk);
1626 }
1627
1628 return 0;
1629}
1630
1631static int mmci_runtime_resume(struct device *dev)
1632{
1633 struct amba_device *adev = to_amba_device(dev);
1634 struct mmc_host *mmc = amba_get_drvdata(adev);
1635
1636 if (mmc) {
1637 struct mmci_host *host = mmc_priv(mmc);
1638 clk_prepare_enable(host->clk);
1639 }
1640
1641 return 0;
1642}
1643#endif
1644
1617static const struct dev_pm_ops mmci_dev_pm_ops = { 1645static const struct dev_pm_ops mmci_dev_pm_ops = {
1618 SET_SYSTEM_SLEEP_PM_OPS(mmci_suspend, mmci_resume) 1646 SET_SYSTEM_SLEEP_PM_OPS(mmci_suspend, mmci_resume)
1647 SET_RUNTIME_PM_OPS(mmci_runtime_suspend, mmci_runtime_resume, NULL)
1619}; 1648};
1620 1649
1621static struct amba_id mmci_ids[] = { 1650static struct amba_id mmci_ids[] = {