summaryrefslogtreecommitdiff
path: root/include
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 /include
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 'include')
-rw-r--r--include/linux/dmaengine.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
index 0d41e4481881..82adfe61ab0e 100644
--- a/include/linux/dmaengine.h
+++ b/include/linux/dmaengine.h
@@ -505,10 +505,11 @@ struct dma_device {
struct dma_async_tx_descriptor *(*device_prep_slave_sg)(
struct dma_chan *chan, struct scatterlist *sgl,
unsigned int sg_len, enum dma_transfer_direction direction,
- unsigned long flags);
+ unsigned long flags, void *context);
struct dma_async_tx_descriptor *(*device_prep_dma_cyclic)(
struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
- size_t period_len, enum dma_transfer_direction direction);
+ size_t period_len, enum dma_transfer_direction direction,
+ void *context);
int (*device_control)(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
unsigned long arg);
@@ -539,7 +540,8 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single(
struct scatterlist sg;
sg_init_one(&sg, buf, len);
- return chan->device->device_prep_slave_sg(chan, &sg, 1, dir, flags);
+ return chan->device->device_prep_slave_sg(chan, &sg, 1,
+ dir, flags, NULL);
}
static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_sg(
@@ -547,7 +549,7 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_sg(
enum dma_transfer_direction dir, unsigned long flags)
{
return chan->device->device_prep_slave_sg(chan, sgl, sg_len,
- dir, flags);
+ dir, flags, NULL);
}
static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
@@ -555,7 +557,7 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
size_t period_len, enum dma_transfer_direction dir)
{
return chan->device->device_prep_dma_cyclic(chan, buf_addr, buf_len,
- period_len, dir);
+ period_len, dir, NULL);
}
static inline int dmaengine_terminate_all(struct dma_chan *chan)