diff options
Diffstat (limited to 'include/linux/dma-mapping.h')
-rw-r--r-- | include/linux/dma-mapping.h | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index fd4aee29ad10..0c3eab1e39ac 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h | |||
@@ -8,6 +8,12 @@ | |||
8 | #include <linux/dma-direction.h> | 8 | #include <linux/dma-direction.h> |
9 | #include <linux/scatterlist.h> | 9 | #include <linux/scatterlist.h> |
10 | 10 | ||
11 | /* | ||
12 | * A dma_addr_t can hold any valid DMA or bus address for the platform. | ||
13 | * It can be given to a device to use as a DMA source or target. A CPU cannot | ||
14 | * reference a dma_addr_t directly because there may be translation between | ||
15 | * its physical address space and the bus address space. | ||
16 | */ | ||
11 | struct dma_map_ops { | 17 | struct dma_map_ops { |
12 | void* (*alloc)(struct device *dev, size_t size, | 18 | void* (*alloc)(struct device *dev, size_t size, |
13 | dma_addr_t *dma_handle, gfp_t gfp, | 19 | dma_addr_t *dma_handle, gfp_t gfp, |
@@ -186,7 +192,7 @@ static inline int dma_get_cache_alignment(void) | |||
186 | 192 | ||
187 | #ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | 193 | #ifndef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY |
188 | static inline int | 194 | static inline int |
189 | dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | 195 | dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr, |
190 | dma_addr_t device_addr, size_t size, int flags) | 196 | dma_addr_t device_addr, size_t size, int flags) |
191 | { | 197 | { |
192 | return 0; | 198 | return 0; |
@@ -217,13 +223,14 @@ extern void *dmam_alloc_noncoherent(struct device *dev, size_t size, | |||
217 | extern void dmam_free_noncoherent(struct device *dev, size_t size, void *vaddr, | 223 | extern void dmam_free_noncoherent(struct device *dev, size_t size, void *vaddr, |
218 | dma_addr_t dma_handle); | 224 | dma_addr_t dma_handle); |
219 | #ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | 225 | #ifdef ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY |
220 | extern int dmam_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | 226 | extern int dmam_declare_coherent_memory(struct device *dev, |
227 | phys_addr_t phys_addr, | ||
221 | dma_addr_t device_addr, size_t size, | 228 | dma_addr_t device_addr, size_t size, |
222 | int flags); | 229 | int flags); |
223 | extern void dmam_release_declared_memory(struct device *dev); | 230 | extern void dmam_release_declared_memory(struct device *dev); |
224 | #else /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ | 231 | #else /* ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY */ |
225 | static inline int dmam_declare_coherent_memory(struct device *dev, | 232 | static inline int dmam_declare_coherent_memory(struct device *dev, |
226 | dma_addr_t bus_addr, dma_addr_t device_addr, | 233 | phys_addr_t phys_addr, dma_addr_t device_addr, |
227 | size_t size, gfp_t gfp) | 234 | size_t size, gfp_t gfp) |
228 | { | 235 | { |
229 | return 0; | 236 | return 0; |