diff options
author | Alexandre Bounine <alexandre.bounine@idt.com> | 2012-05-31 19:26:38 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-05-31 20:49:31 -0400 |
commit | e42d98ebe7d754a2c9fbccd6186721d3ca8679f6 (patch) | |
tree | eed734672410f2eb8fab07fbd14f88bfaf8a882f /include/linux/dmaengine.h | |
parent | ce2d52cc1364a22fc1a161781e60ee3cbb499a6d (diff) |
rapidio: add DMA engine support for RIO data transfers
Adds DMA Engine framework support into RapidIO subsystem.
Uses DMA Engine DMA_SLAVE interface to generate data transfers to/from
remote RapidIO target devices.
Introduces RapidIO-specific wrapper for prep_slave_sg() interface with an
extra parameter to pass target specific information.
Uses scatterlist to describe local data buffer. Address flat data buffer
on a remote side.
Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Acked-by: Vinod Koul <vinod.koul@linux.intel.com>
Cc: Li Yang <leoli@freescale.com>
Cc: Matt Porter <mporter@kernel.crashing.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/dmaengine.h')
-rw-r--r-- | include/linux/dmaengine.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index d3fec584e8c3..56377df39124 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -635,6 +635,18 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_sg( | |||
635 | dir, flags, NULL); | 635 | dir, flags, NULL); |
636 | } | 636 | } |
637 | 637 | ||
638 | #ifdef CONFIG_RAPIDIO_DMA_ENGINE | ||
639 | struct rio_dma_ext; | ||
640 | static inline struct dma_async_tx_descriptor *dmaengine_prep_rio_sg( | ||
641 | struct dma_chan *chan, struct scatterlist *sgl, unsigned int sg_len, | ||
642 | enum dma_transfer_direction dir, unsigned long flags, | ||
643 | struct rio_dma_ext *rio_ext) | ||
644 | { | ||
645 | return chan->device->device_prep_slave_sg(chan, sgl, sg_len, | ||
646 | dir, flags, rio_ext); | ||
647 | } | ||
648 | #endif | ||
649 | |||
638 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( | 650 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( |
639 | struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, | 651 | struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, |
640 | size_t period_len, enum dma_transfer_direction dir) | 652 | size_t period_len, enum dma_transfer_direction dir) |