diff options
-rw-r--r-- | arch/xtensa/include/asm/dma-mapping.h | 6 | ||||
-rw-r--r-- | arch/xtensa/kernel/pci-dma.c | 23 |
2 files changed, 4 insertions, 25 deletions
diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h index 269738dc9d1d..353e0314d6ba 100644 --- a/arch/xtensa/include/asm/dma-mapping.h +++ b/arch/xtensa/include/asm/dma-mapping.h | |||
@@ -23,8 +23,10 @@ static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) | |||
23 | return &xtensa_dma_map_ops; | 23 | return &xtensa_dma_map_ops; |
24 | } | 24 | } |
25 | 25 | ||
26 | void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 26 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
27 | enum dma_data_direction direction); | 27 | enum dma_data_direction direction) |
28 | { | ||
29 | } | ||
28 | 30 | ||
29 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) | 31 | static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr) |
30 | { | 32 | { |
diff --git a/arch/xtensa/kernel/pci-dma.c b/arch/xtensa/kernel/pci-dma.c index cec86a1c2acc..623720a11143 100644 --- a/arch/xtensa/kernel/pci-dma.c +++ b/arch/xtensa/kernel/pci-dma.c | |||
@@ -26,29 +26,6 @@ | |||
26 | #include <asm/cacheflush.h> | 26 | #include <asm/cacheflush.h> |
27 | #include <asm/io.h> | 27 | #include <asm/io.h> |
28 | 28 | ||
29 | void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | ||
30 | enum dma_data_direction dir) | ||
31 | { | ||
32 | switch (dir) { | ||
33 | case DMA_BIDIRECTIONAL: | ||
34 | __flush_invalidate_dcache_range((unsigned long)vaddr, size); | ||
35 | break; | ||
36 | |||
37 | case DMA_FROM_DEVICE: | ||
38 | __invalidate_dcache_range((unsigned long)vaddr, size); | ||
39 | break; | ||
40 | |||
41 | case DMA_TO_DEVICE: | ||
42 | __flush_dcache_range((unsigned long)vaddr, size); | ||
43 | break; | ||
44 | |||
45 | case DMA_NONE: | ||
46 | BUG(); | ||
47 | break; | ||
48 | } | ||
49 | } | ||
50 | EXPORT_SYMBOL(dma_cache_sync); | ||
51 | |||
52 | static void do_cache_op(dma_addr_t dma_handle, size_t size, | 29 | static void do_cache_op(dma_addr_t dma_handle, size_t size, |
53 | void (*fn)(unsigned long, unsigned long)) | 30 | void (*fn)(unsigned long, unsigned long)) |
54 | { | 31 | { |