diff options
Diffstat (limited to 'include/linux/dmaengine.h')
| -rw-r--r-- | include/linux/dmaengine.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index f9a2e5e67a54..56377df39124 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
| @@ -615,11 +615,13 @@ static inline int dmaengine_slave_config(struct dma_chan *chan, | |||
| 615 | } | 615 | } |
| 616 | 616 | ||
| 617 | static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single( | 617 | static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_single( |
| 618 | struct dma_chan *chan, void *buf, size_t len, | 618 | struct dma_chan *chan, dma_addr_t buf, size_t len, |
| 619 | enum dma_transfer_direction dir, unsigned long flags) | 619 | enum dma_transfer_direction dir, unsigned long flags) |
| 620 | { | 620 | { |
| 621 | struct scatterlist sg; | 621 | struct scatterlist sg; |
| 622 | sg_init_one(&sg, buf, len); | 622 | sg_init_table(&sg, 1); |
| 623 | sg_dma_address(&sg) = buf; | ||
| 624 | sg_dma_len(&sg) = len; | ||
| 623 | 625 | ||
| 624 | return chan->device->device_prep_slave_sg(chan, &sg, 1, | 626 | return chan->device->device_prep_slave_sg(chan, &sg, 1, |
| 625 | dir, flags, NULL); | 627 | dir, flags, NULL); |
| @@ -633,6 +635,18 @@ static inline struct dma_async_tx_descriptor *dmaengine_prep_slave_sg( | |||
| 633 | dir, flags, NULL); | 635 | dir, flags, NULL); |
| 634 | } | 636 | } |
| 635 | 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 | |||
| 636 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( | 650 | static inline struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic( |
| 637 | 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, |
| 638 | size_t period_len, enum dma_transfer_direction dir) | 652 | size_t period_len, enum dma_transfer_direction dir) |
