Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
dma-mapping.h File Reference
#include <linux/dma-debug.h>
#include <asm-generic/dma-coherent.h>

Go to the source code of this file.

Macros

#define dma_supported(d, m)   1
 
#define dma_alloc_noncoherent(d, s, h, f)   dma_alloc_coherent((d), (s), (h), (f))
 
#define dma_free_noncoherent(d, s, v, h)   dma_free_coherent((d), (s), (v), (h))
 

Functions

dma_addr_t dma_map_single (struct device *dev, void *cpu_addr, size_t size, enum dma_data_direction dir)
 
void dma_unmap_single (struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir)
 
int dma_map_sg (struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction)
 
void dma_unmap_sg (struct device *dev, struct scatterlist *sglist, int nents, enum dma_data_direction direction)
 
void dma_sync_single_for_cpu (struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir)
 
void dma_sync_single_for_device (struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir)
 
void dma_sync_sg_for_cpu (struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir)
 
void dma_sync_sg_for_device (struct device *dev, struct scatterlist *sg, int nents, enum dma_data_direction dir)
 
void coherent_mem_init (u32 start, u32 size)
 
voiddma_alloc_coherent (struct device *, size_t, dma_addr_t *, gfp_t)
 
void dma_free_coherent (struct device *, size_t, void *, dma_addr_t)
 

Macro Definition Documentation

#define dma_alloc_noncoherent (   d,
  s,
  h,
  f 
)    dma_alloc_coherent((d), (s), (h), (f))

Definition at line 88 of file dma-mapping.h.

#define dma_free_noncoherent (   d,
  s,
  v,
  h 
)    dma_free_coherent((d), (s), (v), (h))

Definition at line 89 of file dma-mapping.h.

#define dma_supported (   d,
  m 
)    1

Definition at line 18 of file dma-mapping.h.

Function Documentation

void coherent_mem_init ( u32  start,
u32  size 
)

Definition at line 119 of file dma-coherent.c.

void* dma_alloc_coherent ( struct device ,
size_t  ,
dma_addr_t ,
gfp_t   
)

dma_alloc_coherent - allocate consistent memory for DMA : valid struct device pointer, or NULL for ISA and EISA-like devices : required memory size : bus-specific DMA address

Allocate some uncached, unbuffered memory for a device for performing DMA. This function allocates pages, and will return the CPU-viewed address, and sets to be the device-viewed address.

Definition at line 96 of file dma-coherent.c.

void dma_free_coherent ( struct device ,
size_t  ,
void ,
dma_addr_t   
)

dma_free_coherent - free memory allocated by dma_alloc_coherent : valid struct device pointer, or NULL for ISA and EISA-like devices : size of memory originally requested in dma_alloc_coherent : CPU-view address returned from dma_alloc_coherent : device-view address returned from dma_alloc_coherent

Free (and unmap) a DMA buffer previously allocated by dma_alloc_coherent().

References to memory and mappings associated with cpu_addr/handle during and after this call executing are illegal.

Definition at line 110 of file dma-coherent.c.

int dma_map_sg ( struct device dev,
struct scatterlist sglist,
int  nents,
enum dma_data_direction  direction 
)

Definition at line 125 of file dma-mapping.c.

dma_addr_t dma_map_single ( struct device dev,
void cpu_addr,
size_t  size,
enum dma_data_direction  dir 
)

Definition at line 39 of file dma.c.

void dma_sync_sg_for_cpu ( struct device dev,
struct scatterlist sg,
int  nents,
enum dma_data_direction  dir 
)

Definition at line 114 of file dma.c.

void dma_sync_sg_for_device ( struct device dev,
struct scatterlist sg,
int  nents,
enum dma_data_direction  dir 
)

Definition at line 140 of file dma-mapping.c.

void dma_sync_single_for_cpu ( struct device dev,
dma_addr_t  handle,
size_t  size,
enum dma_data_direction  dir 
)

Definition at line 94 of file dma.c.

void dma_sync_single_for_device ( struct device dev,
dma_addr_t  handle,
size_t  size,
enum dma_data_direction  dir 
)

Definition at line 104 of file dma.c.

void dma_unmap_sg ( struct device dev,
struct scatterlist sglist,
int  nents,
enum dma_data_direction  direction 
)

Definition at line 81 of file dma.c.

void dma_unmap_single ( struct device dev,
dma_addr_t  handle,
size_t  size,
enum dma_data_direction  dir 
)

Definition at line 54 of file dma.c.