summaryrefslogtreecommitdiff
path: root/drivers/dma/imx-sdma.c
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2012-03-08 15:35:13 -0500
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-04-05 09:11:50 -0700
commitf1ac5721f3c665c611ebd981718c8e0101d3e8c7 (patch)
tree9b7b56ea98bbab7c5bead1b150c7836f1f8fd636 /drivers/dma/imx-sdma.c
parenta9eb124efa19b973d4672a1ee00fa991e1a021f2 (diff)
dmaengine: add context parameter to prep_slave_sg and prep_dma_cyclic
Add context parameter to device_prep_slave_sg() and device_prep_dma_cyclic() interfaces to allow passing client/target specific information associated with the data transfer. Modify all affected DMA engine drivers. Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com> Cherry-picked from mainline 185ecb5f4fd43911c35956d4cc7d94a1da30417f Change-Id: Ief79d20f6e9d367ee2b530d08df72864fb16895a Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/94464 Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/dma/imx-sdma.c')
-rw-r--r--drivers/dma/imx-sdma.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 46909e441852..c163f1eefb18 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -886,8 +886,8 @@ static void sdma_free_chan_resources(struct dma_chan *chan)
static struct dma_async_tx_descriptor *sdma_prep_slave_sg(
struct dma_chan *chan, struct scatterlist *sgl,
- unsigned int sg_len, enum dma_data_direction direction,
- unsigned long flags)
+ unsigned int sg_len, enum dma_transfer_direction direction,
+ unsigned long flags, void *context)
{
struct sdma_channel *sdmac = to_sdma_chan(chan);
struct sdma_engine *sdma = sdmac->sdma;
@@ -983,7 +983,8 @@ err_out:
static struct dma_async_tx_descriptor *sdma_prep_dma_cyclic(
struct dma_chan *chan, dma_addr_t dma_addr, size_t buf_len,
- size_t period_len, enum dma_data_direction direction)
+ size_t period_len, enum dma_transfer_direction direction,
+ void *context)
{
struct sdma_channel *sdmac = to_sdma_chan(chan);
struct sdma_engine *sdma = sdmac->sdma;
@@ -1094,12 +1095,8 @@ static enum dma_status sdma_tx_status(struct dma_chan *chan,
last_used = chan->cookie;
-<<<<<<< HEAD
- dma_set_tx_state(txstate, sdmac->last_completed, last_used, 0);
-=======
dma_set_tx_state(txstate, chan->completed_cookie, last_used,
sdmac->chn_count - sdmac->chn_real_count);
->>>>>>> 4d4e58d... dmaengine: move last completed cookie into generic dma_chan structure
return sdmac->status;
}