aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/mxs-dma.c
diff options
context:
space:
mode:
authorShawn Guo <shawn.guo@linaro.org>2011-12-20 00:54:00 -0500
committerShawn Guo <shawn.guo@linaro.org>2011-12-28 08:29:30 -0500
commit759a2e30d288032130f1f77092e72d4ec87ad4d0 (patch)
treefa6e62b3823eddd4251a830a8d79c31ef305e0a2 /drivers/dma/mxs-dma.c
parent0ebafefcaa7a383b728d977a718e23e69ce84050 (diff)
dma: mxs-dma: convert to clk_prepare/clk_unprepare
The patch converts mxs-dma driver to clk_prepare/clk_unprepare by using helper functions clk_prepare_enable/clk_disable_unprepare. Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Marek Vasut <marek.vasut@gmail.com> Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/mxs-dma.c')
-rw-r--r--drivers/dma/mxs-dma.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c
index b4588bdd98bb..fc903c0ed234 100644
--- a/drivers/dma/mxs-dma.c
+++ b/drivers/dma/mxs-dma.c
@@ -334,7 +334,7 @@ static int mxs_dma_alloc_chan_resources(struct dma_chan *chan)
334 goto err_irq; 334 goto err_irq;
335 } 335 }
336 336
337 ret = clk_enable(mxs_dma->clk); 337 ret = clk_prepare_enable(mxs_dma->clk);
338 if (ret) 338 if (ret)
339 goto err_clk; 339 goto err_clk;
340 340
@@ -372,7 +372,7 @@ static void mxs_dma_free_chan_resources(struct dma_chan *chan)
372 dma_free_coherent(mxs_dma->dma_device.dev, PAGE_SIZE, 372 dma_free_coherent(mxs_dma->dma_device.dev, PAGE_SIZE,
373 mxs_chan->ccw, mxs_chan->ccw_phys); 373 mxs_chan->ccw, mxs_chan->ccw_phys);
374 374
375 clk_disable(mxs_dma->clk); 375 clk_disable_unprepare(mxs_dma->clk);
376} 376}
377 377
378static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg( 378static struct dma_async_tx_descriptor *mxs_dma_prep_slave_sg(
@@ -578,7 +578,7 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
578{ 578{
579 int ret; 579 int ret;
580 580
581 ret = clk_enable(mxs_dma->clk); 581 ret = clk_prepare_enable(mxs_dma->clk);
582 if (ret) 582 if (ret)
583 goto err_out; 583 goto err_out;
584 584
@@ -604,7 +604,7 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
604 writel(MXS_DMA_CHANNELS_MASK << MXS_DMA_CHANNELS, 604 writel(MXS_DMA_CHANNELS_MASK << MXS_DMA_CHANNELS,
605 mxs_dma->base + HW_APBHX_CTRL1 + MXS_SET_ADDR); 605 mxs_dma->base + HW_APBHX_CTRL1 + MXS_SET_ADDR);
606 606
607 clk_disable(mxs_dma->clk); 607 clk_disable_unprepare(mxs_dma->clk);
608 608
609 return 0; 609 return 0;
610 610