Additional callbacks

The callback specified using dma_parms_comp_cb() is always called on completion of the DMA transfer. However if the DMA transfer results in multiple FDMA nodes then it can optionally be called after each node is processed. This occurs after each struct scatterlist element for scatter-gather transfers, or after each transfer descriptor for a linked list transfer.

Use the inline function dma_params_interrupts() to enable FDMA interrupts.

void dma_params_interrupts(struct stm_dma_params *p, unsigned long isrflag)

In addition to a pointer p to a stm_dma_params structure, this function accepts a parameter isrflag. This parameter determines the interrupt mode to select and can take one of the following values:

  • STM_DMA_INTER_NODE_PAUSE. This value causes the FDMA to interrupt and pause the transfer after each node. The user is responsible for restarting a transfer that has been paused (as described in Control and Status functions.) For scatter-gather transfers, the function triggers an interrupt for each element of the scatterlist. For circular transfers, the function triggers an interrupt each time a node is processed.
  • STM_DMA_COMP_INT (STLinux 2.3 only). This value generates an interrupt to the FDMA after each node, but doesn't pause the transfer.