Skip to content

Commit

Permalink
dma: mxs-dma: Always leave mxs_dma_init() with the clock disabled.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lothar Waßmann authored and Vinod Koul committed Dec 23, 2011
1 parent 4003122 commit feb397d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/dma/mxs-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)

ret = clk_enable(mxs_dma->clk);
if (ret)
goto err_out;
return ret;

ret = mxs_reset_block(mxs_dma->base);
if (ret)
Expand All @@ -604,11 +604,8 @@ static int __init mxs_dma_init(struct mxs_dma_engine *mxs_dma)
writel(MXS_DMA_CHANNELS_MASK << MXS_DMA_CHANNELS,
mxs_dma->base + HW_APBHX_CTRL1 + MXS_SET_ADDR);

clk_disable(mxs_dma->clk);

return 0;

err_out:
clk_disable(mxs_dma->clk);
return ret;
}

Expand Down

0 comments on commit feb397d

Please sign in to comment.