Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dma-coherent.h
Go to the documentation of this file.
1 #ifndef DMA_COHERENT_H
2 #define DMA_COHERENT_H
3 
4 #ifdef CONFIG_HAVE_GENERIC_DMA_COHERENT
5 /*
6  * These three functions are only for dma allocator.
7  * Don't use them in device drivers.
8  */
10  dma_addr_t *dma_handle, void **ret);
11 int dma_release_from_coherent(struct device *dev, int order, void *vaddr);
12 
13 int dma_mmap_from_coherent(struct device *dev, struct vm_area_struct *vma,
14  void *cpu_addr, size_t size, int *ret);
15 /*
16  * Standard interface
17  */
18 #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY
19 extern int
21  dma_addr_t device_addr, size_t size, int flags);
22 
23 extern void
25 
26 extern void *
28  dma_addr_t device_addr, size_t size);
29 #else
30 #define dma_alloc_from_coherent(dev, size, handle, ret) (0)
31 #define dma_release_from_coherent(dev, order, vaddr) (0)
32 #define dma_mmap_from_coherent(dev, vma, vaddr, order, ret) (0)
33 #endif
34 
35 #endif