diff options
author | Rob Herring <rob.herring@calxeda.com> | 2012-02-10 21:04:56 -0500 |
---|---|---|
committer | Rob Herring <rob.herring@calxeda.com> | 2012-03-06 22:34:45 -0500 |
commit | 5621caac1d9514b568f986b55ce5494b1d119d40 (patch) | |
tree | 5d497486f317ea95edb998825a900d01aff667a0 /arch/arm/include/asm | |
parent | 4d5fc58dbe34b78157c05b319669bb3e064ba8bd (diff) |
ARM: kill off __mem_pci
__mem_pci is only used to enable readl/writel and friends. Just condition
this on readl being defined and remove all the __mem_pci defines.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Lennert Buytenhek <kernel@wantstofly.org>
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
Cc: Nicolas Pitre <nico@fluxnic.net>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Colin Cross <ccross@android.com>
Cc: Olof Johansson <olof@lixom.net>
Cc: Stephen Warren <swarren@nvidia.com>
Diffstat (limited to 'arch/arm/include/asm')
-rw-r--r-- | arch/arm/include/asm/io.h | 46 |
1 files changed, 17 insertions, 29 deletions
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h index 233034e46ec6..11d2072f95d1 100644 --- a/arch/arm/include/asm/io.h +++ b/arch/arm/include/asm/io.h | |||
@@ -118,7 +118,6 @@ static inline void __iomem *__typesafe_io(unsigned long addr) | |||
118 | #include <mach/io.h> | 118 | #include <mach/io.h> |
119 | #else | 119 | #else |
120 | #define __io(a) ({ (void)(a); __typesafe_io(0); }) | 120 | #define __io(a) ({ (void)(a); __typesafe_io(0); }) |
121 | #define __mem_pci(a) (a) | ||
122 | #endif | 121 | #endif |
123 | 122 | ||
124 | /* | 123 | /* |
@@ -221,18 +220,18 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
221 | * Again, this are defined to perform little endian accesses. See the | 220 | * Again, this are defined to perform little endian accesses. See the |
222 | * IO port primitives for more information. | 221 | * IO port primitives for more information. |
223 | */ | 222 | */ |
224 | #ifdef __mem_pci | 223 | #ifndef readl |
225 | #define readb_relaxed(c) ({ u8 __r = __raw_readb(__mem_pci(c)); __r; }) | 224 | #define readb_relaxed(c) ({ u8 __r = __raw_readb(c); __r; }) |
226 | #define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \ | 225 | #define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \ |
227 | __raw_readw(__mem_pci(c))); __r; }) | 226 | __raw_readw(c)); __r; }) |
228 | #define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \ | 227 | #define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \ |
229 | __raw_readl(__mem_pci(c))); __r; }) | 228 | __raw_readl(c)); __r; }) |
230 | 229 | ||
231 | #define writeb_relaxed(v,c) ((void)__raw_writeb(v,__mem_pci(c))) | 230 | #define writeb_relaxed(v,c) ((void)__raw_writeb(v,c)) |
232 | #define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \ | 231 | #define writew_relaxed(v,c) ((void)__raw_writew((__force u16) \ |
233 | cpu_to_le16(v),__mem_pci(c))) | 232 | cpu_to_le16(v),c)) |
234 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \ | 233 | #define writel_relaxed(v,c) ((void)__raw_writel((__force u32) \ |
235 | cpu_to_le32(v),__mem_pci(c))) | 234 | cpu_to_le32(v),c)) |
236 | 235 | ||
237 | #define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; }) | 236 | #define readb(c) ({ u8 __v = readb_relaxed(c); __iormb(); __v; }) |
238 | #define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; }) | 237 | #define readw(c) ({ u16 __v = readw_relaxed(c); __iormb(); __v; }) |
@@ -242,30 +241,19 @@ extern void _memset_io(volatile void __iomem *, int, size_t); | |||
242 | #define writew(v,c) ({ __iowmb(); writew_relaxed(v,c); }) | 241 | #define writew(v,c) ({ __iowmb(); writew_relaxed(v,c); }) |
243 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); }) | 242 | #define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); }) |
244 | 243 | ||
245 | #define readsb(p,d,l) __raw_readsb(__mem_pci(p),d,l) | 244 | #define readsb(p,d,l) __raw_readsb(p,d,l) |
246 | #define readsw(p,d,l) __raw_readsw(__mem_pci(p),d,l) | 245 | #define readsw(p,d,l) __raw_readsw(p,d,l) |
247 | #define readsl(p,d,l) __raw_readsl(__mem_pci(p),d,l) | 246 | #define readsl(p,d,l) __raw_readsl(p,d,l) |
248 | 247 | ||
249 | #define writesb(p,d,l) __raw_writesb(__mem_pci(p),d,l) | 248 | #define writesb(p,d,l) __raw_writesb(p,d,l) |
250 | #define writesw(p,d,l) __raw_writesw(__mem_pci(p),d,l) | 249 | #define writesw(p,d,l) __raw_writesw(p,d,l) |
251 | #define writesl(p,d,l) __raw_writesl(__mem_pci(p),d,l) | 250 | #define writesl(p,d,l) __raw_writesl(p,d,l) |
252 | 251 | ||
253 | #define memset_io(c,v,l) _memset_io(__mem_pci(c),(v),(l)) | 252 | #define memset_io(c,v,l) _memset_io(c,(v),(l)) |
254 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),__mem_pci(c),(l)) | 253 | #define memcpy_fromio(a,c,l) _memcpy_fromio((a),c,(l)) |
255 | #define memcpy_toio(c,a,l) _memcpy_toio(__mem_pci(c),(a),(l)) | 254 | #define memcpy_toio(c,a,l) _memcpy_toio(c,(a),(l)) |
256 | 255 | ||
257 | #elif !defined(readb) | 256 | #endif /* readl */ |
258 | |||
259 | #define readb(c) (__readwrite_bug("readb"),0) | ||
260 | #define readw(c) (__readwrite_bug("readw"),0) | ||
261 | #define readl(c) (__readwrite_bug("readl"),0) | ||
262 | #define writeb(v,c) __readwrite_bug("writeb") | ||
263 | #define writew(v,c) __readwrite_bug("writew") | ||
264 | #define writel(v,c) __readwrite_bug("writel") | ||
265 | |||
266 | #define check_signature(io,sig,len) (0) | ||
267 | |||
268 | #endif /* __mem_pci */ | ||
269 | 257 | ||
270 | /* | 258 | /* |
271 | * ioremap and friends. | 259 | * ioremap and friends. |