When all the parameters have been specified (see Configuring a transfer), use the function dma_compile_list() to compile the transfer (as described by the stm_dma_params structure) into a linked list of nodes that can then be executed by the FDMA.
/* STLinux-2.2 */ int dma_compile_list(struct stm_dma_params *params); /* STLinux-2.3 */ int dma_compile_list(unsigned int chan, struct stm_dma_params *params, gfp_t gfp_mask)
The dma_compile_list() function fails and returns an error number if the structure pointed to by params contains incomplete or invalid data. If the error is fatal, it may log a message to the serial console.
Compiling a transfer causes the FDMA driver to allocate memory for a node (or nodelist) and populate that memory to correspond with the parameters in the stm_dma_params structure. This operation can fail if insufficient memory is available in the system, or if the parameters are incorrect.
gfpspecifies the flags to be passed to any memory allocation functions used while compiling the transfer. The most frequently used values are GFP_KERNEL and GFP_ATOMIC.
For a linked list of nodes, call dma_compile_list() for the first transfer descriptor in the list only. The DMA driver walks through the list of transfer descriptors and compiles a self-consistent node list.