summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorWilliam Qiu <william.qiu@starfivetech.com>2023-02-13 05:04:21 +0300
committerWilliam Qiu <william.qiu@starfivetech.com>2023-02-13 05:04:21 +0300
commit4f291797d34fee059df26257ae922b15dc8656bf (patch)
treec3523f55328d3be7a6224a8a6c1c8ff091b82f62 /drivers/mmc
parentcbf92daa945c1bfe7f8b5b9afe3b43277d74d653 (diff)
downloadlinux-4f291797d34fee059df26257ae922b15dc8656bf.tar.xz
hibernation: mmc: change the runtime PM API
Use the common API to do the runtime PM. Signed-off-by: William Qiu <william.qiu@starfivetech.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/dw_mmc-starfive.c36
1 files changed, 2 insertions, 34 deletions
diff --git a/drivers/mmc/host/dw_mmc-starfive.c b/drivers/mmc/host/dw_mmc-starfive.c
index 0cb0bab5fc97..404d2f1aed02 100644
--- a/drivers/mmc/host/dw_mmc-starfive.c
+++ b/drivers/mmc/host/dw_mmc-starfive.c
@@ -234,43 +234,11 @@ static int dw_mci_starfive_remove(struct platform_device *pdev)
return dw_mci_pltfm_remove(pdev);
}
-#ifdef CONFIG_PM
-static int dw_mci_starfive_runtime_suspend(struct device *dev)
-{
- struct dw_mci *host = dev_get_drvdata(dev);
-
- clk_disable_unprepare(host->biu_clk);
- clk_disable_unprepare(host->ciu_clk);
-
- return 0;
-}
-
-static int dw_mci_starfive_runtime_resume(struct device *dev)
-{
- struct dw_mci *host = dev_get_drvdata(dev);
- int ret;
-
- ret = clk_prepare_enable(host->biu_clk);
- if (ret) {
- dev_err(host->dev, "Failed to prepare_enable biu_clk clock\n");
- return ret;
- }
-
- ret = clk_prepare_enable(host->ciu_clk);
- if (ret) {
- dev_err(host->dev, "Failed to prepare_enable ciu_clk clock\n");
- return ret;
- }
-
- return 0;
-}
-#endif
-
static const struct dev_pm_ops dw_mci_starfive_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
pm_runtime_force_resume)
- SET_RUNTIME_PM_OPS(dw_mci_starfive_runtime_suspend,
- dw_mci_starfive_runtime_resume, NULL)
+ SET_RUNTIME_PM_OPS(dw_mci_runtime_suspend,
+ dw_mci_runtime_resume, NULL)
};
static struct platform_driver dw_mci_starfive_driver = {