diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2009-06-03 11:16:04 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2009-11-13 12:10:37 -0500 |
commit | f8ac04255dc8baa1c018e8028222d842efa56e6b (patch) | |
tree | 4aedfaf3f4a2e5f0ffbc3280fa94e48e10ac9e38 /arch/mips/include/asm/dma-mapping.h | |
parent | da0bac33413b2888d3623dad3ad19ce76b688f07 (diff) |
MIPS: Add DMA declare coherent memory support
The ohci-sm501 driver requires dma_declare_coherent_memory(). It is used
by the driver's local memory allocation with dma_alloc_coherent().
Tested on TANBAC TB0287(VR4131 + SM501).
[Ralf: Fixed reject in dma-default.c and removed the entire #if 0'ed block
in dma-mapping.h instead of just the #if 0.]
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/include/asm/dma-mapping.h')
-rw-r--r-- | arch/mips/include/asm/dma-mapping.h | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index d16afddb09a9..664ba53dc32a 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h | |||
@@ -3,6 +3,7 @@ | |||
3 | 3 | ||
4 | #include <asm/scatterlist.h> | 4 | #include <asm/scatterlist.h> |
5 | #include <asm/cache.h> | 5 | #include <asm/cache.h> |
6 | #include <asm-generic/dma-coherent.h> | ||
6 | 7 | ||
7 | void *dma_alloc_noncoherent(struct device *dev, size_t size, | 8 | void *dma_alloc_noncoherent(struct device *dev, size_t size, |
8 | dma_addr_t *dma_handle, gfp_t flag); | 9 | dma_addr_t *dma_handle, gfp_t flag); |
@@ -73,14 +74,4 @@ extern int dma_is_consistent(struct device *dev, dma_addr_t dma_addr); | |||
73 | extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 74 | extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
74 | enum dma_data_direction direction); | 75 | enum dma_data_direction direction); |
75 | 76 | ||
76 | #if 0 | ||
77 | #define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY | ||
78 | |||
79 | extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, | ||
80 | dma_addr_t device_addr, size_t size, int flags); | ||
81 | extern void dma_release_declared_memory(struct device *dev); | ||
82 | extern void * dma_mark_declared_memory_occupied(struct device *dev, | ||
83 | dma_addr_t device_addr, size_t size); | ||
84 | #endif | ||
85 | |||
86 | #endif /* _ASM_DMA_MAPPING_H */ | 77 | #endif /* _ASM_DMA_MAPPING_H */ |