• Home
  • Raw
  • Download

Lines Matching +full:channel +full:- +full:use

8           ``Documentation/crypto/async-tx-api.rst``
11 Below is a guide to device driver writers on how to use the Slave-DMA API of the
19 - Allocate a DMA slave channel
21 - Set slave and controller specific parameters
23 - Get a descriptor for transaction
25 - Submit the transaction
27 - Issue pending requests and wait for callback notification
31 1. Allocate a DMA slave channel
33 Channel allocation is slightly different in the slave DMA context,
34 client drivers typically need a channel from a particular DMA
35 controller only and even in some cases a specific channel is desired.
36 To request a channel dma_request_chan() API is used.
40 .. code-block:: c
44 Which will find and return the ``name`` DMA channel associated with the 'dev'
48 A channel allocated via this interface is exclusive to the caller,
54 driver. Most of the generic information which a slave DMA can use
66 .. code-block:: c
79 DMA-engine are:
81 - slave_sg: DMA a list of scatter gather buffers from/to a peripheral
83 - dma_cyclic: Perform a cyclic DMA operation from/to a peripheral till the
86 - interleaved_dma: This is common to Slave as well as M2M clients. For slave
90 interleaved DMA transfers are also possible if supported by the channel by
93 A non-NULL return of this transfer API represents a "descriptor" for
98 .. code-block:: c
121 .. code-block:: c
123 nr_sg = dma_map_sg(chan->device->dev, sgl, sg_len);
165 .. code-block:: c
182 completed, then the client must use completion callback.
184 .. code-block:: c
194 .. code-block:: c
203 - DMA_MEM_TO_DEV / DEV_MEM_TO_MEM:
207 2. use dmaengine_desc_attach_metadata() to attach the buffer to the
211 - DMA_DEV_TO_MEM:
214 2. use dmaengine_desc_attach_metadata() to attach the buffer to the
222 - DMA_MEM_TO_DEV / DEV_MEM_TO_MEM:
225 2. use dmaengine_desc_get_metadata_ptr() to get the pointer to the
228 4. use dmaengine_desc_set_metadata_len() to tell the DMA engine the
232 - DMA_DEV_TO_MEM:
236 3. on transfer completion, use dmaengine_desc_get_metadata_ptr() to get
246 Mixed use of DESC_METADATA_CLIENT / DESC_METADATA_ENGINE is not allowed,
247 client drivers must use either of the modes per descriptor.
256 .. code-block:: c
276 issue_pending API. If channel is idle then the first transaction in
285 .. code-block:: c
290 ------------
294 .. code-block:: c
300 This causes all activity for the DMA channel to be stopped, and may
321 .. code-block:: c
325 This pauses activity on the DMA channel without data loss.
329 .. code-block:: c
333 Resume a previously paused DMA channel. It is invalid to resume a
334 channel which is not currently paused.
338 .. code-block:: c
343 This can be used to check the status of the channel. Please see
354 a running DMA channel. It is recommended that DMA engine users
355 pause or stop (via dmaengine_terminate_all()) the channel before
360 .. code-block:: c
364 Synchronize the termination of the DMA channel to the current context.
367 the termination of the DMA channel to the current context. The function will
371 If dmaengine_terminate_async() is used to stop the DMA channel this function