The DMA engine API

The DMA engine is a generic kernel framework for developing a DMA controller driver. The main goal of DMA is offloading the CPU when it comes to copy memory. One delegates a transaction (I/O data transfers) to the DMA engine by the use of channels. A DMA engine, through its driver/API, exposes a set of channels that can be used by other devices (slaves). The DMA Engine layout is shown in the following diagram:

DMA Engine layout

Here, we will simply walk through the (slave) API, which is applicable for slave DMA usage only. The mandatory header here is as follows:

 #include <linux/dmaengine.h> 

Using the slave DMA is straightforward, ...

Get Linux Device Drivers Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.