aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/dmaengine.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/dmaengine.txt')
-rw-r--r--Documentation/dmaengine.txt17
1 files changed, 9 insertions, 8 deletions
diff --git a/Documentation/dmaengine.txt b/Documentation/dmaengine.txt
index 879b6e31e2da..573e28ce9751 100644
--- a/Documentation/dmaengine.txt
+++ b/Documentation/dmaengine.txt
@@ -84,31 +84,32 @@ The slave DMA usage consists of following steps:
84 the given transaction. 84 the given transaction.
85 85
86 Interface: 86 Interface:
87 struct dma_async_tx_descriptor *(*chan->device->device_prep_slave_sg)( 87 struct dma_async_tx_descriptor *dmaengine_prep_slave_sg(
88 struct dma_chan *chan, struct scatterlist *sgl, 88 struct dma_chan *chan, struct scatterlist *sgl,
89 unsigned int sg_len, enum dma_data_direction direction, 89 unsigned int sg_len, enum dma_data_direction direction,
90 unsigned long flags); 90 unsigned long flags);
91 91
92 struct dma_async_tx_descriptor *(*chan->device->device_prep_dma_cyclic)( 92 struct dma_async_tx_descriptor *dmaengine_prep_dma_cyclic(
93 struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len, 93 struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
94 size_t period_len, enum dma_data_direction direction); 94 size_t period_len, enum dma_data_direction direction);
95 95
96 struct dma_async_tx_descriptor *(*device_prep_interleaved_dma)( 96 struct dma_async_tx_descriptor *dmaengine_prep_interleaved_dma(
97 struct dma_chan *chan, struct dma_interleaved_template *xt, 97 struct dma_chan *chan, struct dma_interleaved_template *xt,
98 unsigned long flags); 98 unsigned long flags);
99 99
100 The peripheral driver is expected to have mapped the scatterlist for 100 The peripheral driver is expected to have mapped the scatterlist for
101 the DMA operation prior to calling device_prep_slave_sg, and must 101 the DMA operation prior to calling device_prep_slave_sg, and must
102 keep the scatterlist mapped until the DMA operation has completed. 102 keep the scatterlist mapped until the DMA operation has completed.
103 The scatterlist must be mapped using the DMA struct device. So, 103 The scatterlist must be mapped using the DMA struct device.
104 normal setup should look like this: 104 If a mapping needs to be synchronized later, dma_sync_*_for_*() must be
105 called using the DMA struct device, too.
106 So, normal setup should look like this:
105 107
106 nr_sg = dma_map_sg(chan->device->dev, sgl, sg_len); 108 nr_sg = dma_map_sg(chan->device->dev, sgl, sg_len);
107 if (nr_sg == 0) 109 if (nr_sg == 0)
108 /* error */ 110 /* error */
109 111
110 desc = chan->device->device_prep_slave_sg(chan, sgl, nr_sg, 112 desc = dmaengine_prep_slave_sg(chan, sgl, nr_sg, direction, flags);
111 direction, flags);
112 113
113 Once a descriptor has been obtained, the callback information can be 114 Once a descriptor has been obtained, the callback information can be
114 added and the descriptor must then be submitted. Some DMA engine 115 added and the descriptor must then be submitted. Some DMA engine
@@ -188,7 +189,7 @@ Further APIs:
188 description of this API. 189 description of this API.
189 190
190 This can be used in conjunction with dma_async_is_complete() and 191 This can be used in conjunction with dma_async_is_complete() and
191 the cookie returned from 'descriptor->submit()' to check for 192 the cookie returned from dmaengine_submit() to check for
192 completion of a specific DMA transaction. 193 completion of a specific DMA transaction.
193 194
194 Note: 195 Note: