aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGary Zhang <b13634@freescale.com>2011-10-21 11:28:23 +0800
committerEric Miao <eric.miao@canonical.com>2011-11-10 07:38:51 +0800
commit0b42c1ab6e075303a8418784c5313b0f0ce60432 (patch)
tree1e2c90939102403b0f04c094ec8cee73773eec8f /drivers
parent6ed6226eaa55a58d729342bc78f109c6146c6f5e (diff)
ENGR00160512 SDMA: close clock when not used
When SDMA is not used, close SDMA clock. Signed-off-by: Gary Zhang <b13634@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/dma/imx-sdma.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 34dd96a2f37..7dd48b11ee4 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -833,11 +833,11 @@ static int sdma_alloc_chan_resources(struct dma_chan *chan)
sdmac->peripheral_type = data->peripheral_type;
sdmac->event_id0 = data->dma_request;
- ret = sdma_set_channel_priority(sdmac, prio);
+ ret = sdma_request_channel(sdmac);
if (ret)
return ret;
- ret = sdma_request_channel(sdmac);
+ ret = sdma_set_channel_priority(sdmac, prio);
if (ret)
return ret;
@@ -1142,7 +1142,6 @@ static int __init sdma_get_firmware(struct sdma_engine *sdma,
addr = (void *)header + header->script_addrs_start;
ram_code = (void *)header + header->ram_code_start;
- clk_enable(sdma->clk);
/* download the RAM image for SDMA */
sdma_load_script(sdma, ram_code,
header->ram_code_size,