October 2017
Intermediate to advanced
586 pages
14h 8m
English
One requests a channel using dma_request_channel(). Its prototype is as follows:
struct dma_chan *dma_request_channel(const dma_cap_mask_t *mask,
dma_filter_fn fn, void *fn_param);
mask is a bitmap mask that represents the capabilities the channel must satisfy. One uses it essentially to specify the transfer types the driver needs to perform:
enum dma_transaction_type { DMA_MEMCPY, /* Memory to memory copy */ DMA_XOR, /* Memory to memory XOR*/ DMA_PQ, /* Memory to memory P+Q computation */ DMA_XOR_VAL, /* Memory buffer parity check using XOR */ DMA_PQ_VAL, /* Memory buffer parity check using P+Q */ DMA_INTERRUPT, /* The device is able to generate dummy transfer that will generate interrupts */ DMA_SG, /* Memory ...