]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ARM: kill off __mem_pci
authorRob Herring <rob.herring@calxeda.com>
Sat, 11 Feb 2012 02:04:56 +0000 (20:04 -0600)
committerRob Herring <rob.herring@calxeda.com>
Wed, 7 Mar 2012 03:34:45 +0000 (21:34 -0600)
__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>
16 files changed:
arch/arm/include/asm/io.h
arch/arm/mach-dove/include/mach/io.h
arch/arm/mach-footbridge/include/mach/io.h
arch/arm/mach-integrator/include/mach/io.h
arch/arm/mach-iop13xx/include/mach/io.h
arch/arm/mach-iop32x/include/mach/io.h
arch/arm/mach-iop33x/include/mach/io.h
arch/arm/mach-ixp2000/include/mach/io.h
arch/arm/mach-ixp23xx/include/mach/io.h
arch/arm/mach-ixp4xx/include/mach/io.h
arch/arm/mach-kirkwood/include/mach/io.h
arch/arm/mach-mv78xx0/include/mach/io.h
arch/arm/mach-rpc/include/mach/io.h
arch/arm/mach-s3c2410/include/mach/io.h
arch/arm/mach-shark/include/mach/io.h
arch/arm/mach-tegra/include/mach/io.h

index 233034e46ec646dc5226e97b6285f8c33c89b88b..11d2072f95d10657d01f60d0e711f251bd4534d6 100644 (file)
@@ -118,7 +118,6 @@ static inline void __iomem *__typesafe_io(unsigned long addr)
 #include <mach/io.h>
 #else
 #define __io(a)                ({ (void)(a); __typesafe_io(0); })
-#define __mem_pci(a)   (a)
 #endif
 
 /*
@@ -221,18 +220,18 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
  * Again, this are defined to perform little endian accesses.  See the
  * IO port primitives for more information.
  */
-#ifdef __mem_pci
-#define readb_relaxed(c) ({ u8  __r = __raw_readb(__mem_pci(c)); __r; })
+#ifndef readl
+#define readb_relaxed(c) ({ u8  __r = __raw_readb(c); __r; })
 #define readw_relaxed(c) ({ u16 __r = le16_to_cpu((__force __le16) \
-                                       __raw_readw(__mem_pci(c))); __r; })
+                                       __raw_readw(c)); __r; })
 #define readl_relaxed(c) ({ u32 __r = le32_to_cpu((__force __le32) \
-                                       __raw_readl(__mem_pci(c))); __r; })
+                                       __raw_readl(c)); __r; })
 
-#define writeb_relaxed(v,c)    ((void)__raw_writeb(v,__mem_pci(c)))
+#define writeb_relaxed(v,c)    ((void)__raw_writeb(v,c))
 #define writew_relaxed(v,c)    ((void)__raw_writew((__force u16) \
-                                       cpu_to_le16(v),__mem_pci(c)))
+                                       cpu_to_le16(v),c))
 #define writel_relaxed(v,c)    ((void)__raw_writel((__force u32) \
-                                       cpu_to_le32(v),__mem_pci(c)))
+                                       cpu_to_le32(v),c))
 
 #define readb(c)               ({ u8  __v = readb_relaxed(c); __iormb(); __v; })
 #define readw(c)               ({ u16 __v = readw_relaxed(c); __iormb(); __v; })
@@ -242,30 +241,19 @@ extern void _memset_io(volatile void __iomem *, int, size_t);
 #define writew(v,c)            ({ __iowmb(); writew_relaxed(v,c); })
 #define writel(v,c)            ({ __iowmb(); writel_relaxed(v,c); })
 
-#define readsb(p,d,l)          __raw_readsb(__mem_pci(p),d,l)
-#define readsw(p,d,l)          __raw_readsw(__mem_pci(p),d,l)
-#define readsl(p,d,l)          __raw_readsl(__mem_pci(p),d,l)
+#define readsb(p,d,l)          __raw_readsb(p,d,l)
+#define readsw(p,d,l)          __raw_readsw(p,d,l)
+#define readsl(p,d,l)          __raw_readsl(p,d,l)
 
-#define writesb(p,d,l)         __raw_writesb(__mem_pci(p),d,l)
-#define writesw(p,d,l)         __raw_writesw(__mem_pci(p),d,l)
-#define writesl(p,d,l)         __raw_writesl(__mem_pci(p),d,l)
+#define writesb(p,d,l)         __raw_writesb(p,d,l)
+#define writesw(p,d,l)         __raw_writesw(p,d,l)
+#define writesl(p,d,l)         __raw_writesl(p,d,l)
 
-#define memset_io(c,v,l)       _memset_io(__mem_pci(c),(v),(l))
-#define memcpy_fromio(a,c,l)   _memcpy_fromio((a),__mem_pci(c),(l))
-#define memcpy_toio(c,a,l)     _memcpy_toio(__mem_pci(c),(a),(l))
+#define memset_io(c,v,l)       _memset_io(c,(v),(l))
+#define memcpy_fromio(a,c,l)   _memcpy_fromio((a),c,(l))
+#define memcpy_toio(c,a,l)     _memcpy_toio(c,(a),(l))
 
-#elif !defined(readb)
-
-#define readb(c)                       (__readwrite_bug("readb"),0)
-#define readw(c)                       (__readwrite_bug("readw"),0)
-#define readl(c)                       (__readwrite_bug("readl"),0)
-#define writeb(v,c)                    __readwrite_bug("writeb")
-#define writew(v,c)                    __readwrite_bug("writew")
-#define writel(v,c)                    __readwrite_bug("writel")
-
-#define check_signature(io,sig,len)    (0)
-
-#endif /* __mem_pci */
+#endif /* readl */
 
 /*
  * ioremap and friends.
index eb4936ff90ad9c42b283fc6c354eae1f01c6c4c7..29c8b85355a5243db77f468d32d80d6695993468 100644 (file)
@@ -15,6 +15,5 @@
 
 #define __io(a)        ((void __iomem *)(((a) - DOVE_PCIE0_IO_BUS_BASE) + \
                                                 DOVE_PCIE0_IO_VIRT_BASE))
-#define __mem_pci(a)   (a)
 
 #endif
index 15a70396c27d41f123910fdd9cd7844d2d2cf033..aba531eebbc6723cfe5ea69c31634caac46a160b 100644 (file)
  * Translation of various region addresses to virtual addresses
  */
 #define __io(a)                        ((void __iomem *)(PCIO_BASE + (a)))
-#if 1
-#define __mem_pci(a)           (a)
-#else
-
-static inline void __iomem *___mem_pci(void __iomem *p)
-{
-       unsigned long a = (unsigned long)p;
-       BUG_ON(a <= 0xc0000000 || a >= 0xe0000000);
-       return p;
-}
-
-#define __mem_pci(a)           ___mem_pci(a)
-#endif
 
 #endif
index 37beed3fa3ed38a811faea3e96886f046abef737..8de70de3dd0a3fd57b3de3aa2ee0a862098eb916 100644 (file)
@@ -29,6 +29,5 @@
 #define PCI_IO_VADDR            0xee000000
 
 #define __io(a)                        ((void __iomem *)(PCI_IO_VADDR + (a)))
-#define __mem_pci(a)           (a)
 
 #endif
index 058dbfdf7066d33ee672f167255380b2c3707a5e..f13188518025f07515082189e767772828763a3b 100644 (file)
@@ -22,8 +22,6 @@
 #define IO_SPACE_LIMIT 0xffffffff
 
 #define __io(a) __iop13xx_io(a)
-#define __mem_pci(a) (a)
-#define __mem_isa(a) (a)
 
 extern void __iomem * __iop13xx_io(unsigned long io_addr);
 
index 2d88264b9863b36de1c4d837aafb2cb2a9941693..e2ada265bb8d0d498b6c90b66f67c02281f67af8 100644 (file)
@@ -15,6 +15,5 @@
 
 #define IO_SPACE_LIMIT         0xffffffff
 #define __io(p)                ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
-#define __mem_pci(a)           (a)
 
 #endif
index a8a66fc8fbdbe8eb5ac34c3a5b08583caa1d3de7..f7c1b6595660bc6f8cfb33bf9c9a440b4b4f8c26 100644 (file)
@@ -15,6 +15,5 @@
 
 #define IO_SPACE_LIMIT         0xffffffff
 #define __io(p)                ((void __iomem *)IOP3XX_PCI_IO_PHYS_TO_VIRT(p))
-#define __mem_pci(a)           (a)
 
 #endif
index 859e584914d98072c7b06870be2ec8f914d29392..f6552d6f35ab193e5771db6a2c9b5d5a2a10737c 100644 (file)
@@ -18,7 +18,6 @@
 #include <mach/hardware.h>
 
 #define IO_SPACE_LIMIT         0xffffffff
-#define __mem_pci(a)           (a)
 
 /*
  * The A? revisions of the IXP2000s assert byte lanes for PCI I/O
index 4ce4353b9f72d144ba07febbd6f56a3f557407cd..a7aceb55c1306dc66341b0adf50ecd27401a9815 100644 (file)
@@ -18,6 +18,5 @@
 #define IO_SPACE_LIMIT 0xffffffff
 
 #define __io(p)                ((void __iomem*)((p) + IXP23XX_PCI_IO_VIRT))
-#define __mem_pci(a)   (a)
 
 #endif
index 6a520768e5edd08f7c9c0cf766d1948b3088aea4..5cf30d1b78d22b8901865f0426efefcc09d2a9c1 100644 (file)
@@ -39,11 +39,7 @@ extern int ixp4xx_pci_write(u32 addr, u32 cmd, u32 data);
  *    but in some cases the performance hit is acceptable. In addition, you
  *    cannot mmap() PCI devices in this case.
  */
-#ifndef        CONFIG_IXP4XX_INDIRECT_PCI
-
-#define __mem_pci(a)           (a)
-
-#else
+#ifdef CONFIG_IXP4XX_INDIRECT_PCI
 
 /*
  * In the case of using indirect PCI, we simply return the actual PCI
index 49dd0cb5e16621818a49c52ff529b9b7b18df5f4..5d0ab61700d2a1519acc0fdcefe8def46bdf7c02 100644 (file)
@@ -20,7 +20,5 @@ static inline void __iomem *__io(unsigned long addr)
 }
 
 #define __io(a)                        __io(a)
-#define __mem_pci(a)           (a)
-
 
 #endif
index 450e0e1ad0920df19f330cf4c0898e6e385035e1..c7d9d00d8fc17ad1a3e2cba71343d02639afe5ee 100644 (file)
@@ -20,7 +20,5 @@ static inline void __iomem *__io(unsigned long addr)
 }
 
 #define __io(a)                        __io(a)
-#define __mem_pci(a)           (a)
-
 
 #endif
index 695f4ed2e11bab87d45ccd8ee2574a2ca8939dcd..707071a7ea4ea15c572c028388346bc9ac6758b2 100644 (file)
@@ -28,9 +28,4 @@
  */
 #define __io(a)                (PCIO_BASE + ((a) << 2))
 
-/*
- * 1:1 mapping for ioremapped regions.
- */
-#define __mem_pci(x)   (x)
-
 #endif
index 118749f37c4cddf2df549218a218bd5dd850ee16..5dd1db4e267724275d90913d74246d6da122d2bc 100644 (file)
@@ -208,9 +208,4 @@ DECLARE_IO(int,l,"")
 #define outsw(p,d,l)   __raw_writesw(__ioaddr(p),d,l)
 #define outsl(p,d,l)   __raw_writesl(__ioaddr(p),d,l)
 
-/*
- * 1:1 mapping for ioremapped regions.
- */
-#define __mem_pci(x)   (x)
-
 #endif
index 9ccbcecc430baa679a8fd800dfe409a5744f34e3..1a45fc01ff1d939979c65367dc7dee1f06607186 100644 (file)
@@ -15,6 +15,4 @@
 
 #define __io(a)                 ((void __iomem *)(0xe0000000 + (a)))
 
-#define __mem_pci(addr) (addr)
-
 #endif
index 47b4b611911676f4210dbc9cbe454b9103c6b45c..fe700f9ce7dc993e4ceabfd10e7f86e5b76bc0b9 100644 (file)
@@ -40,7 +40,6 @@ static inline void __iomem *__io(unsigned long addr)
 #endif
 
 #define __io(a)         __io(a)
-#define __mem_pci(a)    (a)
 
 #endif