Skip to content

Commit

Permalink
dma/imx-sdma: let sdma_run_channel call sdma_enable_channel
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Zhao authored and Vinod Koul committed Jan 31, 2012
1 parent 880db3f commit b9a5916
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/dma/imx-sdma.c
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,11 @@ static int sdma_config_ownership(struct sdma_channel *sdmac,
return 0;
}

static void sdma_enable_channel(struct sdma_engine *sdma, int channel)
{
__raw_writel(1 << channel, sdma->regs + SDMA_H_START);
}

/*
* sdma_run_channel - run a channel and wait till it's done
*/
Expand All @@ -405,7 +410,7 @@ static int sdma_run_channel(struct sdma_channel *sdmac)

init_completion(&sdmac->done);

__raw_writel(1 << channel, sdma->regs + SDMA_H_START);
sdma_enable_channel(sdma, channel);

ret = wait_for_completion_timeout(&sdmac->done, HZ);

Expand Down Expand Up @@ -811,11 +816,6 @@ static int sdma_request_channel(struct sdma_channel *sdmac)
return ret;
}

static void sdma_enable_channel(struct sdma_engine *sdma, int channel)
{
__raw_writel(1 << channel, sdma->regs + SDMA_H_START);
}

static dma_cookie_t sdma_assign_cookie(struct sdma_channel *sdmac)
{
dma_cookie_t cookie = sdmac->chan.cookie;
Expand Down

0 comments on commit b9a5916

Please sign in to comment.