diff options
author | Lothar Waßmann <LW@KARO-electronics.de> | 2011-12-08 03:15:42 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2011-12-23 10:24:54 -0500 |
commit | feb397de65c3f76e40ef70e264f2cdf688c850c1 (patch) | |
tree | c4f47467c4c05782b40d5cf47550220b19ecae72 /drivers/dma/mxs-dma.c | |
parent | 400312201b0cf4e4deaf75842f5e95212b382e81 (diff) |
dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
There is no need to have the clock enabled all the time the driver is
loaded.
It will be enabled anyway in mxs_dma_alloc_chan_resources() when a
channel is actually going to be used.
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma/mxs-dma.c')
-rw-r--r-- | drivers/dma/mxs-dma.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/dma/mxs-dma.c b/drivers/dma/mxs-dma.c index d04662e94467..b0e6ac3e09aa 100644 --- a/drivers/dma/mxs-dma.c +++ b/drivers/dma/mxs-dma.c | |||
@@ -580,7 +580,7 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma) | |||
580 | 580 | ||
581 | ret = clk_enable(mxs_dma->clk); | 581 | ret = clk_enable(mxs_dma->clk); |
582 | if (ret) | 582 | if (ret) |
583 | goto err_out; | 583 | return ret; |
584 | 584 | ||
585 | ret = mxs_reset_block(mxs_dma->base); | 585 | ret = mxs_reset_block(mxs_dma->base); |
586 | if (ret) | 586 | if (ret) |
@@ -604,11 +604,8 @@ 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); | ||
608 | |||
609 | return 0; | ||
610 | |||
611 | err_out: | 607 | err_out: |
608 | clk_disable(mxs_dma->clk); | ||
612 | return ret; | 609 | return ret; |
613 | } | 610 | } |
614 | 611 | ||