|
libmetal
|
Data Structures | |
| struct | metal_sg |
| scatter/gather list element structure More... | |
Macros | |
| #define | METAL_DMA_DEV_R 1 |
| #define | METAL_DMA_DEV_W 2 |
| #define | METAL_DMA_DEV_WR 3 |
Functions | |
| int | metal_dma_map (struct metal_device *dev, uint32_t dir, struct metal_sg *sg_in, int nents_in, struct metal_sg *sg_out) |
| Map memory for DMA transaction. After the memory is DMA mapped, the memory should be accessed by the DMA device but not the CPU. More... | |
| void | metal_dma_unmap (struct metal_device *dev, uint32_t dir, struct metal_sg *sg, int nents) |
| Unmap DMA memory After the memory is DMA unmapped, the memory should be accessed by the CPU but not the DMA device. More... | |
| #define METAL_DMA_DEV_R 1 |
DMA direction, device read
| #define METAL_DMA_DEV_W 2 |
DMA direction, device write
| #define METAL_DMA_DEV_WR 3 |
DMA direction, device read/write
| int metal_dma_map | ( | struct metal_device * | dev, |
| uint32_t | dir, | ||
| struct metal_sg * | sg_in, | ||
| int | nents_in, | ||
| struct metal_sg * | sg_out | ||
| ) |
Map memory for DMA transaction. After the memory is DMA mapped, the memory should be accessed by the DMA device but not the CPU.
| [in] | dev | DMA device |
| [in] | dir | DMA direction |
| [in] | sg_in | sg list of memory to map |
| [in] | nents_in | number of sg list entries of memory to map |
| [out] | sg_out | sg list of mapped memory |
| void metal_dma_unmap | ( | struct metal_device * | dev, |
| uint32_t | dir, | ||
| struct metal_sg * | sg, | ||
| int | nents | ||
| ) |
Unmap DMA memory After the memory is DMA unmapped, the memory should be accessed by the CPU but not the DMA device.
| [in] | dev | DMA device |
| [in] | dir | DMA direction |
| [in] | sg | sg list of mapped DMA memory |
| [in] | nents | number of sg list entries of DMA memory |