aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@st.com>2012-04-17 07:40:07 -0400
committerVinod Koul <vinod.koul@linux.intel.com>2012-05-11 01:13:39 -0400
commit3075528d3dd1ac8b729fccf2cbc3119057088223 (patch)
tree2552203b1278a768ec9a75dc6eb5266dfdda08aa /drivers/dma
parent56cbb3dd48623c01e7c589d29da743d486c95a58 (diff)
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: Viresh Kumar <viresh.kumar@st.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/dw_dmac.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index 7439079f5eed..300d976b6661 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -1429,7 +1429,7 @@ static int __init dw_probe(struct platform_device *pdev)
1429 err = PTR_ERR(dw->clk); 1429 err = PTR_ERR(dw->clk);
1430 goto err_clk; 1430 goto err_clk;
1431 } 1431 }
1432 clk_enable(dw->clk); 1432 clk_prepare_enable(dw->clk);
1433 1433
1434 /* force dma off, just in case */ 1434 /* force dma off, just in case */
1435 dw_dma_off(dw); 1435 dw_dma_off(dw);
@@ -1510,7 +1510,7 @@ static int __init dw_probe(struct platform_device *pdev)
1510 return 0; 1510 return 0;
1511 1511
1512err_irq: 1512err_irq:
1513 clk_disable(dw->clk); 1513 clk_disable_unprepare(dw->clk);
1514 clk_put(dw->clk); 1514 clk_put(dw->clk);
1515err_clk: 1515err_clk:
1516 iounmap(dw->regs); 1516 iounmap(dw->regs);
@@ -1540,7 +1540,7 @@ static int __exit dw_remove(struct platform_device *pdev)
1540 channel_clear_bit(dw, CH_EN, dwc->mask); 1540 channel_clear_bit(dw, CH_EN, dwc->mask);
1541 } 1541 }
1542 1542
1543 clk_disable(dw->clk); 1543 clk_disable_unprepare(dw->clk);
1544 clk_put(dw->clk); 1544 clk_put(dw->clk);
1545 1545
1546 iounmap(dw->regs); 1546 iounmap(dw->regs);
@@ -1559,7 +1559,7 @@ static void dw_shutdown(struct platform_device *pdev)
1559 struct dw_dma *dw = platform_get_drvdata(pdev); 1559 struct dw_dma *dw = platform_get_drvdata(pdev);
1560 1560
1561 dw_dma_off(platform_get_drvdata(pdev)); 1561 dw_dma_off(platform_get_drvdata(pdev));
1562 clk_disable(dw->clk); 1562 clk_disable_unprepare(dw->clk);
1563} 1563}
1564 1564
1565static int dw_suspend_noirq(struct device *dev) 1565static int dw_suspend_noirq(struct device *dev)
@@ -1568,7 +1568,7 @@ static int dw_suspend_noirq(struct device *dev)
1568 struct dw_dma *dw = platform_get_drvdata(pdev); 1568 struct dw_dma *dw = platform_get_drvdata(pdev);
1569 1569
1570 dw_dma_off(platform_get_drvdata(pdev)); 1570 dw_dma_off(platform_get_drvdata(pdev));
1571 clk_disable(dw->clk); 1571 clk_disable_unprepare(dw->clk);
1572 1572
1573 return 0; 1573 return 0;
1574} 1574}
@@ -1578,7 +1578,7 @@ static int dw_resume_noirq(struct device *dev)
1578 struct platform_device *pdev = to_platform_device(dev); 1578 struct platform_device *pdev = to_platform_device(dev);
1579 struct dw_dma *dw = platform_get_drvdata(pdev); 1579 struct dw_dma *dw = platform_get_drvdata(pdev);
1580 1580
1581 clk_enable(dw->clk); 1581 clk_prepare_enable(dw->clk);
1582 dma_writel(dw, CFG, DW_CFG_DMA_EN); 1582 dma_writel(dw, CFG, DW_CFG_DMA_EN);
1583 return 0; 1583 return 0;
1584} 1584}