Skip to Content
Linux Device Drivers Development
book

Linux Device Drivers Development

by John Madieu
October 2017
Intermediate to advanced
586 pages
14h 8m
English
Packt Publishing
Content preview from Linux Device Drivers Development

Allocating a DMA slave channel

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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Device Drivers, Second Edition

Linux Device Drivers, Second Edition

Jonathan Corbet, Alessandro Rubini
Linux Device Drivers, 3rd Edition

Linux Device Drivers, 3rd Edition

Jonathan Corbet, Alessandro Rubini, Greg Kroah-Hartman

Publisher Resources

ISBN: 9781785280009Supplemental Content