diff options
author | Alexandre Bounine <alexandre.bounine@idt.com> | 2012-03-08 15:35:13 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@linux.intel.com> | 2012-03-21 09:50:23 -0400 |
commit | 185ecb5f4fd43911c35956d4cc7d94a1da30417f (patch) | |
tree | ebbdb7f15157d19d8af892cd7948d93947d09ec2 /drivers/dma/ste_dma40.c | |
parent | 16052827d98fbc13c31ebad560af4bd53e2b4dd5 (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>
Diffstat (limited to 'drivers/dma/ste_dma40.c')
-rw-r--r-- | drivers/dma/ste_dma40.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c index 1ea6d02d08ab..bdd41d4bfa8d 100644 --- a/drivers/dma/ste_dma40.c +++ b/drivers/dma/ste_dma40.c | |||
@@ -2289,7 +2289,8 @@ static struct dma_async_tx_descriptor *d40_prep_slave_sg(struct dma_chan *chan, | |||
2289 | struct scatterlist *sgl, | 2289 | struct scatterlist *sgl, |
2290 | unsigned int sg_len, | 2290 | unsigned int sg_len, |
2291 | enum dma_transfer_direction direction, | 2291 | enum dma_transfer_direction direction, |
2292 | unsigned long dma_flags) | 2292 | unsigned long dma_flags, |
2293 | void *context) | ||
2293 | { | 2294 | { |
2294 | if (direction != DMA_DEV_TO_MEM && direction != DMA_MEM_TO_DEV) | 2295 | if (direction != DMA_DEV_TO_MEM && direction != DMA_MEM_TO_DEV) |
2295 | return NULL; | 2296 | return NULL; |
@@ -2300,7 +2301,7 @@ static struct dma_async_tx_descriptor *d40_prep_slave_sg(struct dma_chan *chan, | |||
2300 | static struct dma_async_tx_descriptor * | 2301 | static struct dma_async_tx_descriptor * |
2301 | dma40_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr, | 2302 | dma40_prep_dma_cyclic(struct dma_chan *chan, dma_addr_t dma_addr, |
2302 | size_t buf_len, size_t period_len, | 2303 | size_t buf_len, size_t period_len, |
2303 | enum dma_transfer_direction direction) | 2304 | enum dma_transfer_direction direction, void *context) |
2304 | { | 2305 | { |
2305 | unsigned int periods = buf_len / period_len; | 2306 | unsigned int periods = buf_len / period_len; |
2306 | struct dma_async_tx_descriptor *txd; | 2307 | struct dma_async_tx_descriptor *txd; |