#include <types.h>


Go to the source code of this file.
Data Structures | |
| union | buffer_addr_t |
| A physical/virtual address pair used in struct buffer. More... | |
Defines | |
| #define | CPU_DMA_ALIGN 2 |
| log2 of the minimum alignment of DMA-able objects | |
Functions | |
| static void | dma_sync_for_device (void *vaddr, size_t size, enum dma_direction direction) |
| Synchronize a DMA buffer before transfer. | |
| static void | dma_sync_for_cpu (void *vaddr, size_t size, enum dma_direction direction) |
| Synchronize a DMA buffer after transfer. | |
| static phys_addr_t | dma_map_single (void *vaddr, size_t size, enum dma_direction direction) |
| Map a single contiguous buffer for DMA transfer. | |
| static void | dma_unmap_single (void *vaddr, size_t size, enum dma_direction direction) |
| Unmap a single contiguous buffer after a DMA transfer. | |
Definition in file dma.h.
| #define CPU_DMA_ALIGN 2 |
| static phys_addr_t dma_map_single | ( | void * | vaddr, | |
| size_t | size, | |||
| enum dma_direction | direction | |||
| ) | [inline, static] |
Map a single contiguous buffer for DMA transfer.
After this function has been called, the device can access the buffer, but the CPU must not.
| vaddr | The virtual address of the buffer | |
| size | The length of the buffer in bytes | |
| direction | The direction of the transfer |
Definition at line 104 of file dma.h.
Referenced by buffer_init_rx(), and buffer_init_tx().
| static void dma_sync_for_cpu | ( | void * | vaddr, | |
| size_t | size, | |||
| enum dma_direction | direction | |||
| ) | [inline, static] |
| static void dma_sync_for_device | ( | void * | vaddr, | |
| size_t | size, | |||
| enum dma_direction | direction | |||
| ) | [inline, static] |
| static void dma_unmap_single | ( | void * | vaddr, | |
| size_t | size, | |||
| enum dma_direction | direction | |||
| ) | [inline, static] |
Unmap a single contiguous buffer after a DMA transfer.
After this function has been called, the CPU can access the buffer, but the device must not.
| vaddr | The virtual address of the buffer | |
| size | The length of the buffer in bytes | |
| direction | The direction of the transfer |
1.5.8