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 | |
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')
-rw-r--r-- | arch/arm/include/asm/io.h | 46 | ||||
-rw-r--r-- | arch/arm/mach-dove/include/mach/io.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-footbridge/include/mach/io.h | 13 | ||||
-rw-r--r-- | arch/arm/mach-integrator/include/mach/io.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-iop13xx/include/mach/io.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-iop32x/include/mach/io.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-iop33x/include/mach/io.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-ixp2000/include/mach/io.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-ixp23xx/include/mach/io.h | 1 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/include/mach/io.h | 6 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/include/mach/io.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-mv78xx0/include/mach/io.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-rpc/include/mach/io.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/include/mach/io.h | 5 | ||||
-rw-r--r-- | arch/arm/mach-shark/include/mach/io.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-tegra/include/mach/io.h | 1 |
16 files changed, 18 insertions, 72 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. |
diff --git a/arch/arm/mach-dove/include/mach/io.h b/arch/arm/mach-dove/include/mach/io.h index eb4936ff90ad..29c8b85355a5 100644 --- a/arch/arm/mach-dove/include/mach/io.h +++ b/arch/arm/mach-dove/include/mach/io.h | |||
@@ -15,6 +15,5 @@ | |||
15 | 15 | ||
16 | #define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_BUS_BASE) + \ | 16 | #define __io(a) ((void __iomem *)(((a) - DOVE_PCIE0_IO_BUS_BASE) + \ |
17 | DOVE_PCIE0_IO_VIRT_BASE)) | 17 | DOVE_PCIE0_IO_VIRT_BASE)) |
18 | #define __mem_pci(a) (a) | ||
19 | 18 | ||
20 | #endif | 19 | #endif |
diff --git a/arch/arm/mach-footbridge/include/mach/io.h b/arch/arm/mach-footbridge/include/mach/io.h index 15a70396c27d..aba531eebbc6 100644 --- a/arch/arm/mach-footbridge/include/mach/io.h +++ b/arch/arm/mach-footbridge/include/mach/io.h | |||
@@ -27,18 +27,5 @@ | |||
27 | * Translation of various region addresses to virtual addresses | 27 | * Translation of various region addresses to virtual addresses |
28 | */ | 28 | */ |
29 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) | 29 | #define __io(a) ((void __iomem *)(PCIO_BASE + (a))) |
30 | #if 1 | ||
31 | #define __mem_pci(a) (a) | ||
32 | #else | ||
33 | |||
34 | static inline void __iomem *___mem_pci(void __iomem *p) | ||
35 | { | ||
36 | unsigned long a = (unsigned long)p; | ||
37 | BUG_ON(a <= 0xc0000000 || a >= 0xe0000000); | ||
38 | return p; | ||
39 | } | ||
40 | |||
41 | #define __mem_pci(a) ___mem_pci(a) | ||
42 | #endif | ||
43 | 30 | ||
44 | #endif | 31 | #endif |
diff --git a/arch/arm/mach-integrator/include/mach/io.h b/arch/arm/mach-integrator/include/mach/io.h index 37beed3fa3ed..8de70de3dd0a 100644 --- a/arch/arm/mach-integrator/include/mach/io.h +++ b/arch/arm/mach-integrator/include/mach/io.h | |||
@@ -29,6 +29,5 @@ | |||
29 | #define PCI_IO_VADDR 0xee000000 | 29 | #define PCI_IO_VADDR 0xee000000 |
30 | 30 | ||
31 | #define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a))) | 31 | #define __io(a) ((void __iomem *)(PCI_IO_VADDR + (a))) |
32 | #define __mem_pci(a) (a) | ||
33 | 32 | ||
34 | #endif | 33 | #endif |
diff --git a/arch/arm/mach-iop13xx/include/mach/io.h b/arch/arm/mach-iop13xx/include/mach/io.h index 058dbfdf7066..f13188518025 100644 --- a/arch/arm/mach-iop13xx/include/mach/io.h +++ b/arch/arm/mach-iop13xx/include/mach/io.h | |||
@@ -22,8 +22,6 @@ | |||
22 | #define IO_SPACE_LIMIT 0xffffffff | 22 | #define IO_SPACE_LIMIT 0xffffffff |
23 | 23 | ||
24 | #define __io(a) __iop13xx_io(a) | 24 | #define __io(a) __iop13xx_io(a) |
25 | #define __mem_pci(a) (a) | ||
26 | #define __mem_isa(a) (a) | ||
27 | 25 | ||
28 | extern void __iomem * __iop13xx_io(unsigned long io_addr); | 26 | extern void __iomem * __iop13xx_io(unsigned long io_addr); |
29 | 27 | ||
diff --git a/arch/arm/mach-iop32x/include/mach/io.h b/arch/arm/mach-iop32x/include/mach/io.h index 2d88264b9863..e2ada265bb8d 100644 --- a/arch/arm/mach-iop32x/include/mach/io.h +++ b/arch/arm/mach-iop32x/include/mach/io.h | |||
@@ -15,6 +15,5 @@ | |||
15 | 15 | ||
16 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
17 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) | 17 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) |
18 | #define __mem_pci(a) (a) | ||
19 | 18 | ||
20 | #endif | 19 | #endif |
diff --git a/arch/arm/mach-iop33x/include/mach/io.h b/arch/arm/mach-iop33x/include/mach/io.h index a8a66fc8fbdb..f7c1b6595660 100644 --- a/arch/arm/mach-iop33x/include/mach/io.h +++ b/arch/arm/mach-iop33x/include/mach/io.h | |||
@@ -15,6 +15,5 @@ | |||
15 | 15 | ||
16 | #define IO_SPACE_LIMIT 0xffffffff | 16 | #define IO_SPACE_LIMIT 0xffffffff |
17 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) | 17 | #define __io(p) ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p)) |
18 | #define __mem_pci(a) (a) | ||
19 | 18 | ||
20 | #endif | 19 | #endif |
diff --git a/arch/arm/mach-ixp2000/include/mach/io.h b/arch/arm/mach-ixp2000/include/mach/io.h index 859e584914d9..f6552d6f35ab 100644 --- a/arch/arm/mach-ixp2000/include/mach/io.h +++ b/arch/arm/mach-ixp2000/include/mach/io.h | |||
@@ -18,7 +18,6 @@ | |||
18 | #include <mach/hardware.h> | 18 | #include <mach/hardware.h> |
19 | 19 | ||
20 | #define IO_SPACE_LIMIT 0xffffffff | 20 | #define IO_SPACE_LIMIT 0xffffffff |
21 | #define __mem_pci(a) (a) | ||
22 | 21 | ||
23 | /* | 22 | /* |
24 | * The A? revisions of the IXP2000s assert byte lanes for PCI I/O | 23 | * The A? revisions of the IXP2000s assert byte lanes for PCI I/O |
diff --git a/arch/arm/mach-ixp23xx/include/mach/io.h b/arch/arm/mach-ixp23xx/include/mach/io.h index 4ce4353b9f72..a7aceb55c130 100644 --- a/arch/arm/mach-ixp23xx/include/mach/io.h +++ b/arch/arm/mach-ixp23xx/include/mach/io.h | |||
@@ -18,6 +18,5 @@ | |||
18 | #define IO_SPACE_LIMIT 0xffffffff | 18 | #define IO_SPACE_LIMIT 0xffffffff |
19 | 19 | ||
20 | #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) | 20 | #define __io(p) ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT)) |
21 | #define __mem_pci(a) (a) | ||
22 | 21 | ||
23 | #endif | 22 | #endif |
diff --git a/arch/arm/mach-ixp4xx/include/mach/io.h b/arch/arm/mach-ixp4xx/include/mach/io.h index 6a520768e5ed..5cf30d1b78d2 100644 --- a/arch/arm/mach-ixp4xx/include/mach/io.h +++ b/arch/arm/mach-ixp4xx/include/mach/io.h | |||
@@ -39,11 +39,7 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data); | |||
39 | * but in some cases the performance hit is acceptable. In addition, you | 39 | * but in some cases the performance hit is acceptable. In addition, you |
40 | * cannot mmap() PCI devices in this case. | 40 | * cannot mmap() PCI devices in this case. |
41 | */ | 41 | */ |
42 | #ifndef CONFIG_IXP4XX_INDIRECT_PCI | 42 | #ifdef CONFIG_IXP4XX_INDIRECT_PCI |
43 | |||
44 | #define __mem_pci(a) (a) | ||
45 | |||
46 | #else | ||
47 | 43 | ||
48 | /* | 44 | /* |
49 | * In the case of using indirect PCI, we simply return the actual PCI | 45 | * In the case of using indirect PCI, we simply return the actual PCI |
diff --git a/arch/arm/mach-kirkwood/include/mach/io.h b/arch/arm/mach-kirkwood/include/mach/io.h index 49dd0cb5e166..5d0ab61700d2 100644 --- a/arch/arm/mach-kirkwood/include/mach/io.h +++ b/arch/arm/mach-kirkwood/include/mach/io.h | |||
@@ -20,7 +20,5 @@ static inline void __iomem *__io(unsigned long addr) | |||
20 | } | 20 | } |
21 | 21 | ||
22 | #define __io(a) __io(a) | 22 | #define __io(a) __io(a) |
23 | #define __mem_pci(a) (a) | ||
24 | |||
25 | 23 | ||
26 | #endif | 24 | #endif |
diff --git a/arch/arm/mach-mv78xx0/include/mach/io.h b/arch/arm/mach-mv78xx0/include/mach/io.h index 450e0e1ad092..c7d9d00d8fc1 100644 --- a/arch/arm/mach-mv78xx0/include/mach/io.h +++ b/arch/arm/mach-mv78xx0/include/mach/io.h | |||
@@ -20,7 +20,5 @@ static inline void __iomem *__io(unsigned long addr) | |||
20 | } | 20 | } |
21 | 21 | ||
22 | #define __io(a) __io(a) | 22 | #define __io(a) __io(a) |
23 | #define __mem_pci(a) (a) | ||
24 | |||
25 | 23 | ||
26 | #endif | 24 | #endif |
diff --git a/arch/arm/mach-rpc/include/mach/io.h b/arch/arm/mach-rpc/include/mach/io.h index 695f4ed2e11b..707071a7ea4e 100644 --- a/arch/arm/mach-rpc/include/mach/io.h +++ b/arch/arm/mach-rpc/include/mach/io.h | |||
@@ -28,9 +28,4 @@ | |||
28 | */ | 28 | */ |
29 | #define __io(a) (PCIO_BASE + ((a) << 2)) | 29 | #define __io(a) (PCIO_BASE + ((a) << 2)) |
30 | 30 | ||
31 | /* | ||
32 | * 1:1 mapping for ioremapped regions. | ||
33 | */ | ||
34 | #define __mem_pci(x) (x) | ||
35 | |||
36 | #endif | 31 | #endif |
diff --git a/arch/arm/mach-s3c2410/include/mach/io.h b/arch/arm/mach-s3c2410/include/mach/io.h index 118749f37c4c..5dd1db4e2677 100644 --- a/arch/arm/mach-s3c2410/include/mach/io.h +++ b/arch/arm/mach-s3c2410/include/mach/io.h | |||
@@ -208,9 +208,4 @@ DECLARE_IO(int,l,"") | |||
208 | #define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l) | 208 | #define outsw(p,d,l) __raw_writesw(__ioaddr(p),d,l) |
209 | #define outsl(p,d,l) __raw_writesl(__ioaddr(p),d,l) | 209 | #define outsl(p,d,l) __raw_writesl(__ioaddr(p),d,l) |
210 | 210 | ||
211 | /* | ||
212 | * 1:1 mapping for ioremapped regions. | ||
213 | */ | ||
214 | #define __mem_pci(x) (x) | ||
215 | |||
216 | #endif | 211 | #endif |
diff --git a/arch/arm/mach-shark/include/mach/io.h b/arch/arm/mach-shark/include/mach/io.h index 9ccbcecc430b..1a45fc01ff1d 100644 --- a/arch/arm/mach-shark/include/mach/io.h +++ b/arch/arm/mach-shark/include/mach/io.h | |||
@@ -15,6 +15,4 @@ | |||
15 | 15 | ||
16 | #define __io(a) ((void __iomem *)(0xe0000000 + (a))) | 16 | #define __io(a) ((void __iomem *)(0xe0000000 + (a))) |
17 | 17 | ||
18 | #define __mem_pci(addr) (addr) | ||
19 | |||
20 | #endif | 18 | #endif |
diff --git a/arch/arm/mach-tegra/include/mach/io.h b/arch/arm/mach-tegra/include/mach/io.h index 47b4b6119116..fe700f9ce7dc 100644 --- a/arch/arm/mach-tegra/include/mach/io.h +++ b/arch/arm/mach-tegra/include/mach/io.h | |||
@@ -40,7 +40,6 @@ static inline void __iomem *__io(unsigned long addr) | |||
40 | #endif | 40 | #endif |
41 | 41 | ||
42 | #define __io(a) __io(a) | 42 | #define __io(a) __io(a) |
43 | #define __mem_pci(a) (a) | ||
44 | 43 | ||
45 | #endif | 44 | #endif |
46 | 45 | ||