1 From 151c4e4a06b0b8d16c2fd392bb0e33868b12357f Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@openwrt.org>
3 Date: Mon, 12 Aug 2013 12:45:52 +0200
4 Subject: [PATCH] MIPS: remove unnecessary platform dma helper functions
6 Signed-off-by: Felix Fietkau <nbd@openwrt.org>
8 arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h | 12 ------------
9 arch/mips/include/asm/mach-generic/dma-coherence.h | 10 ----------
10 arch/mips/include/asm/mach-ip27/dma-coherence.h | 10 ----------
11 arch/mips/include/asm/mach-ip32/dma-coherence.h | 11 -----------
12 arch/mips/include/asm/mach-jazz/dma-coherence.h | 10 ----------
13 arch/mips/include/asm/mach-loongson/dma-coherence.h | 10 ----------
14 arch/mips/include/asm/mach-powertv/dma-coherence.h | 10 ----------
15 arch/mips/mm/dma-default.c | 4 +---
16 8 files changed, 1 insertion(+), 76 deletions(-)
18 --- a/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
19 +++ b/arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
20 @@ -46,22 +46,11 @@ static inline int plat_dma_supported(str
24 -static inline void plat_extra_sync_for_device(struct device *dev)
29 static inline int plat_device_is_coherent(struct device *dev)
34 -static inline int plat_dma_mapping_error(struct device *dev,
35 - dma_addr_t dma_addr)
40 dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr);
41 phys_addr_t dma_to_phys(struct device *dev, dma_addr_t daddr);
43 --- a/arch/mips/include/asm/mach-generic/dma-coherence.h
44 +++ b/arch/mips/include/asm/mach-generic/dma-coherence.h
45 @@ -47,16 +47,6 @@ static inline int plat_dma_supported(str
49 -static inline void plat_extra_sync_for_device(struct device *dev)
53 -static inline int plat_dma_mapping_error(struct device *dev,
54 - dma_addr_t dma_addr)
59 static inline int plat_device_is_coherent(struct device *dev)
61 #ifdef CONFIG_DMA_COHERENT
62 --- a/arch/mips/include/asm/mach-ip27/dma-coherence.h
63 +++ b/arch/mips/include/asm/mach-ip27/dma-coherence.h
64 @@ -58,16 +58,6 @@ static inline int plat_dma_supported(str
68 -static inline void plat_extra_sync_for_device(struct device *dev)
72 -static inline int plat_dma_mapping_error(struct device *dev,
73 - dma_addr_t dma_addr)
78 static inline int plat_device_is_coherent(struct device *dev)
80 return 1; /* IP27 non-cohernet mode is unsupported */
81 --- a/arch/mips/include/asm/mach-ip32/dma-coherence.h
82 +++ b/arch/mips/include/asm/mach-ip32/dma-coherence.h
83 @@ -80,17 +80,6 @@ static inline int plat_dma_supported(str
87 -static inline void plat_extra_sync_for_device(struct device *dev)
92 -static inline int plat_dma_mapping_error(struct device *dev,
93 - dma_addr_t dma_addr)
98 static inline int plat_device_is_coherent(struct device *dev)
100 return 0; /* IP32 is non-cohernet */
101 --- a/arch/mips/include/asm/mach-jazz/dma-coherence.h
102 +++ b/arch/mips/include/asm/mach-jazz/dma-coherence.h
103 @@ -48,16 +48,6 @@ static inline int plat_dma_supported(str
107 -static inline void plat_extra_sync_for_device(struct device *dev)
111 -static inline int plat_dma_mapping_error(struct device *dev,
112 - dma_addr_t dma_addr)
117 static inline int plat_device_is_coherent(struct device *dev)
120 --- a/arch/mips/include/asm/mach-loongson/dma-coherence.h
121 +++ b/arch/mips/include/asm/mach-loongson/dma-coherence.h
122 @@ -53,16 +53,6 @@ static inline int plat_dma_supported(str
126 -static inline void plat_extra_sync_for_device(struct device *dev)
130 -static inline int plat_dma_mapping_error(struct device *dev,
131 - dma_addr_t dma_addr)
136 static inline int plat_device_is_coherent(struct device *dev)
139 --- a/arch/mips/include/asm/mach-powertv/dma-coherence.h
140 +++ b/arch/mips/include/asm/mach-powertv/dma-coherence.h
141 @@ -99,16 +99,6 @@ static inline int plat_dma_supported(str
145 -static inline void plat_extra_sync_for_device(struct device *dev)
149 -static inline int plat_dma_mapping_error(struct device *dev,
150 - dma_addr_t dma_addr)
155 static inline int plat_device_is_coherent(struct device *dev)
158 --- a/arch/mips/mm/dma-default.c
159 +++ b/arch/mips/mm/dma-default.c
160 @@ -293,7 +293,6 @@ static void mips_dma_sync_single_for_cpu
161 static void mips_dma_sync_single_for_device(struct device *dev,
162 dma_addr_t dma_handle, size_t size, enum dma_data_direction direction)
164 - plat_extra_sync_for_device(dev);
165 if (!plat_device_is_coherent(dev))
166 __dma_sync(dma_addr_to_page(dev, dma_handle),
167 dma_handle & ~PAGE_MASK, size, direction);
168 @@ -327,7 +326,7 @@ static void mips_dma_sync_sg_for_device(
170 int mips_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
172 - return plat_dma_mapping_error(dev, dma_addr);
176 int mips_dma_supported(struct device *dev, u64 mask)
177 @@ -340,7 +339,6 @@ void dma_cache_sync(struct device *dev,
179 BUG_ON(direction == DMA_NONE);
181 - plat_extra_sync_for_device(dev);
182 if (!plat_device_is_coherent(dev))
183 __dma_sync_virtual(vaddr, size, direction);