diff options
author | Han Xu <han.xu@nxp.com> | 2017-11-08 15:55:27 -0600 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | ee2aa86b9b30d4d7e3334166c969a5ea82173e01 (patch) | |
tree | ce90ca2704b09b81d6fbedbb6e9a8a12f3fbf32c /drivers/dma/mxs-dma.c | |
parent | 6a1dc694bd0e6dd833a08682663e68c13823262f (diff) |
MLK-16786: dma: mxs-dma: fix the unbalanced runtime pm counter
mxs-dma init function will call runtime pm init, the redundant
pm_runtime_force_resume will mess up the counter. Also remove some
unnecessary code.
BuildInfo:
- SCFW 66189d08, IMX-MKIMAGE ea027c4b, ATF
- U-Boot 2017.03-imx_4.9.51_8qm_beta1_8qxp_alpha+g325ac1e
Signed-off-by: Han Xu <han.xu@nxp.com>
Reviewed-by: Frank Li <frank.li@nxp.com>
Diffstat (limited to 'drivers/dma/mxs-dma.c')
-rw-r--r-- | drivers/dma/mxs-dma.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index 792006314ae2..f585b2737c9a 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c @@ -729,18 +729,11 @@ static int mxs_dma_init_rpm(struct mxs_dma_engine *mxs_dma) static int mxs_dma_init(struct mxs_dma_engine *mxs_dma) { int ret; - struct device *dev = &mxs_dma->pdev->dev; ret = mxs_dma_init_rpm(mxs_dma); if (ret) return ret; - ret = pm_runtime_get_sync(dev); - if (ret < 0) { - dev_err(dev, "Failed to enable clock\n"); - return ret; - } - ret = stmp_reset_block(mxs_dma->base); if (ret) goto err_clk; @@ -758,9 +751,6 @@ static int mxs_dma_init(struct mxs_dma_engine *mxs_dma) mxs_dma->base + HW_APBHX_CTRL1 + STMP_OFFSET_REG_SET); err_clk: - pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); - return ret; } @@ -934,13 +924,10 @@ static int mxs_dma_pm_resume(struct device *dev) struct mxs_dma_engine *mxs_dma = dev_get_drvdata(dev); int ret; - ret = pm_runtime_force_resume(dev); - if (ret) - return ret; - ret = mxs_dma_init(mxs_dma); if (ret) return ret; + return 0; } |