diff options
author | Richard Zhao <richard.zhao@linaro.org> | 2012-01-12 22:09:56 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-01-30 22:33:16 -0500 |
commit | b9a591664a21a3d342b9e3b09b0aa2223ae7c469 (patch) | |
tree | 2aa6cffe829676f188aba806c2662648a5968646 /drivers/dma | |
parent | 880db3ff17a973bc0e9847299d1fd9cdf4568ee1 (diff) |
dma/imx-sdma: let sdma_run_channel call sdma_enable_channel
Let all enable channel code call sdma_enable_channel.
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/imx-sdma.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index e58dbf638cc9..46e334d48e8d 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c | |||
@@ -394,6 +394,11 @@ static int sdma_config_ownership(struct sdma_channel *sdmac, | |||
394 | return 0; | 394 | return 0; |
395 | } | 395 | } |
396 | 396 | ||
397 | static void sdma_enable_channel(struct sdma_engine *sdma, int channel) | ||
398 | { | ||
399 | __raw_writel(1 << channel, sdma->regs + SDMA_H_START); | ||
400 | } | ||
401 | |||
397 | /* | 402 | /* |
398 | * sdma_run_channel - run a channel and wait till it's done | 403 | * sdma_run_channel - run a channel and wait till it's done |
399 | */ | 404 | */ |
@@ -405,7 +410,7 @@ static int sdma_run_channel(struct sdma_channel *sdmac) | |||
405 | 410 | ||
406 | init_completion(&sdmac->done); | 411 | init_completion(&sdmac->done); |
407 | 412 | ||
408 | __raw_writel(1 << channel, sdma->regs + SDMA_H_START); | 413 | sdma_enable_channel(sdma, channel); |
409 | 414 | ||
410 | ret = wait_for_completion_timeout(&sdmac->done, HZ); | 415 | ret = wait_for_completion_timeout(&sdmac->done, HZ); |
411 | 416 | ||
@@ -811,11 +816,6 @@ out: | |||
811 | return ret; | 816 | return ret; |
812 | } | 817 | } |
813 | 818 | ||
814 | static void sdma_enable_channel(struct sdma_engine *sdma, int channel) | ||
815 | { | ||
816 | __raw_writel(1 << channel, sdma->regs + SDMA_H_START); | ||
817 | } | ||
818 | |||
819 | static dma_cookie_t sdma_assign_cookie(struct sdma_channel *sdmac) | 819 | static dma_cookie_t sdma_assign_cookie(struct sdma_channel *sdmac) |
820 | { | 820 | { |
821 | dma_cookie_t cookie = sdmac->chan.cookie; | 821 | dma_cookie_t cookie = sdmac->chan.cookie; |