提交 3075528d 编写于 作者: V Viresh Kumar 提交者: Vinod Koul

dmaengine: dw_dmac: Add clk_{un}prepare() support

clk_{un}prepare is mandatory for platforms using common clock framework. Since
this driver is used by SPEAr platform, which supports common clock framework,
add clk_{un}prepare() support for it.
Signed-off-by: NViresh Kumar <viresh.kumar@st.com>
Signed-off-by: NVinod Koul <vinod.koul@linux.intel.com>
上级 56cbb3dd
...@@ -1429,7 +1429,7 @@ static int __init dw_probe(struct platform_device *pdev) ...@@ -1429,7 +1429,7 @@ static int __init dw_probe(struct platform_device *pdev)
err = PTR_ERR(dw->clk); err = PTR_ERR(dw->clk);
goto err_clk; goto err_clk;
} }
clk_enable(dw->clk); clk_prepare_enable(dw->clk);
/* force dma off, just in case */ /* force dma off, just in case */
dw_dma_off(dw); dw_dma_off(dw);
...@@ -1510,7 +1510,7 @@ static int __init dw_probe(struct platform_device *pdev) ...@@ -1510,7 +1510,7 @@ static int __init dw_probe(struct platform_device *pdev)
return 0; return 0;
err_irq: err_irq:
clk_disable(dw->clk); clk_disable_unprepare(dw->clk);
clk_put(dw->clk); clk_put(dw->clk);
err_clk: err_clk:
iounmap(dw->regs); iounmap(dw->regs);
...@@ -1540,7 +1540,7 @@ static int __exit dw_remove(struct platform_device *pdev) ...@@ -1540,7 +1540,7 @@ static int __exit dw_remove(struct platform_device *pdev)
channel_clear_bit(dw, CH_EN, dwc->mask); channel_clear_bit(dw, CH_EN, dwc->mask);
} }
clk_disable(dw->clk); clk_disable_unprepare(dw->clk);
clk_put(dw->clk); clk_put(dw->clk);
iounmap(dw->regs); iounmap(dw->regs);
...@@ -1559,7 +1559,7 @@ static void dw_shutdown(struct platform_device *pdev) ...@@ -1559,7 +1559,7 @@ static void dw_shutdown(struct platform_device *pdev)
struct dw_dma *dw = platform_get_drvdata(pdev); struct dw_dma *dw = platform_get_drvdata(pdev);
dw_dma_off(platform_get_drvdata(pdev)); dw_dma_off(platform_get_drvdata(pdev));
clk_disable(dw->clk); clk_disable_unprepare(dw->clk);
} }
static int dw_suspend_noirq(struct device *dev) static int dw_suspend_noirq(struct device *dev)
...@@ -1568,7 +1568,7 @@ static int dw_suspend_noirq(struct device *dev) ...@@ -1568,7 +1568,7 @@ static int dw_suspend_noirq(struct device *dev)
struct dw_dma *dw = platform_get_drvdata(pdev); struct dw_dma *dw = platform_get_drvdata(pdev);
dw_dma_off(platform_get_drvdata(pdev)); dw_dma_off(platform_get_drvdata(pdev));
clk_disable(dw->clk); clk_disable_unprepare(dw->clk);
return 0; return 0;
} }
...@@ -1578,7 +1578,7 @@ static int dw_resume_noirq(struct device *dev) ...@@ -1578,7 +1578,7 @@ static int dw_resume_noirq(struct device *dev)
struct platform_device *pdev = to_platform_device(dev); struct platform_device *pdev = to_platform_device(dev);
struct dw_dma *dw = platform_get_drvdata(pdev); struct dw_dma *dw = platform_get_drvdata(pdev);
clk_enable(dw->clk); clk_prepare_enable(dw->clk);
dma_writel(dw, CFG, DW_CFG_DMA_EN); dma_writel(dw, CFG, DW_CFG_DMA_EN);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册