102 size_t len,
size_t align ) {
136 size_t len,
size_t align ) {
169 op->set_mask (
dma, mask );
PROVIDE_DMAAPI_INLINE(flat, dma_map)
struct dma_device * dma
DMA device (if unmapping is required)
static void * dma_op_alloc(struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)
Allocate and map DMA-coherent buffer.
void dma_unmap(struct dma_mapping *map, size_t len)
Unmap buffer.
PROVIDE_DMAAPI(op, dma_map, dma_op_map)
void dma_set_mask(struct dma_device *dma, physaddr_t mask)
Set addressable space mask.
static int dma_op_map(struct dma_device *dma, struct dma_mapping *map, void *addr, size_t len, int flags)
Map buffer for DMA.
static void dma_op_ufree(struct dma_mapping *map, void *addr, size_t len)
Unmap and free DMA-coherent buffer from external (user) memory.
physaddr_t mask
Addressable space mask.
void dma_free(struct dma_mapping *map, void *addr, size_t len)
Unmap and free DMA-coherent buffer.
assert((readw(&hdr->flags) &(GTF_reading|GTF_writing))==0)
void * dma_umalloc(struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)
Allocate and map DMA-coherent buffer from external (user) memory.
uint32_t addr
Buffer address.
#define ENODEV
No such device.
void dma_ufree(struct dma_mapping *map, void *addr, size_t len)
Unmap and free DMA-coherent buffer from external (user) memory.
void * dma_alloc(struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)
Allocate and map DMA-coherent buffer.
static uint16_t struct vmbus_xfer_pages_operations * op
static __always_inline int struct dma_mapping * map
static void * dma_op_umalloc(struct dma_device *dma, struct dma_mapping *map, size_t len, size_t align)
Allocate and map DMA-coherent buffer from external (user) memory.
static void dma_op_unmap(struct dma_mapping *map, size_t len)
Unmap buffer.
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
static void dma_op_free(struct dma_mapping *map, void *addr, size_t len)
Unmap and free DMA-coherent buffer.
#define NULL
NULL pointer (VOID *)
static void dma_op_set_mask(struct dma_device *dma, physaddr_t mask)
Set addressable space mask.
physaddr_t dma(struct dma_mapping *map, void *addr)
Get DMA address from virtual address.