From f8ac04255dc8baa1c018e8028222d842efa56e6b Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Thu, 4 Jun 2009 00:16:04 +0900 Subject: 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 Signed-off-by: Ralf Baechle --- arch/mips/include/asm/dma-mapping.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'arch/mips/include/asm') diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index d16afddb09a..664ba53dc32 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h @@ -3,6 +3,7 @@ #include #include +#include void *dma_alloc_noncoherent(struct device *dev, size_t size, 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); extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, enum dma_data_direction direction); -#if 0 -#define ARCH_HAS_DMA_DECLARE_COHERENT_MEMORY - -extern int dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, - dma_addr_t device_addr, size_t size, int flags); -extern void dma_release_declared_memory(struct device *dev); -extern void * dma_mark_declared_memory_occupied(struct device *dev, - dma_addr_t device_addr, size_t size); -#endif - #endif /* _ASM_DMA_MAPPING_H */ -- cgit v1.2.3