aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-10-01 08:13:33 -0400
committerThierry Reding <treding@nvidia.com>2014-11-10 09:15:34 -0500
commit2cd0f55961d87da617adae717737d13cb9518e7f (patch)
treebcc7d9fec972bbeea346fdb94a535dcfeb6105e6 /arch/arm
parentbfb111ec255c82f2501d2898c5d26f39959c0111 (diff)
ARM: ebsa110: Properly override I/O accessors
In order to override accessors properly they must be #define'd so that subsequent generic headers (the one for ARM and finally the architecture independent one) can properly detect it. While at it, make all accessors use volatile void __iomem * to avoid a slew of build warnings. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-ebsa110/include/mach/io.h25
-rw-r--r--arch/arm/mach-ebsa110/io.c14
2 files changed, 25 insertions, 14 deletions
diff --git a/arch/arm/mach-ebsa110/include/mach/io.h b/arch/arm/mach-ebsa110/include/mach/io.h
index 11bb0799424b..69975784acfa 100644
--- a/arch/arm/mach-ebsa110/include/mach/io.h
+++ b/arch/arm/mach-ebsa110/include/mach/io.h
@@ -29,9 +29,9 @@ u8 __readb(const volatile void __iomem *addr);
29u16 __readw(const volatile void __iomem *addr); 29u16 __readw(const volatile void __iomem *addr);
30u32 __readl(const volatile void __iomem *addr); 30u32 __readl(const volatile void __iomem *addr);
31 31
32void __writeb(u8 val, void __iomem *addr); 32void __writeb(u8 val, volatile void __iomem *addr);
33void __writew(u16 val, void __iomem *addr); 33void __writew(u16 val, volatile void __iomem *addr);
34void __writel(u32 val, void __iomem *addr); 34void __writel(u32 val, volatile void __iomem *addr);
35 35
36/* 36/*
37 * Argh, someone forgot the IOCS16 line. We therefore have to handle 37 * Argh, someone forgot the IOCS16 line. We therefore have to handle
@@ -62,20 +62,31 @@ void __writel(u32 val, void __iomem *addr);
62#define writew(v,b) __writew(v,b) 62#define writew(v,b) __writew(v,b)
63#define writel(v,b) __writel(v,b) 63#define writel(v,b) __writel(v,b)
64 64
65#define insb insb
65extern void insb(unsigned int port, void *buf, int sz); 66extern void insb(unsigned int port, void *buf, int sz);
67#define insw insw
66extern void insw(unsigned int port, void *buf, int sz); 68extern void insw(unsigned int port, void *buf, int sz);
69#define insl insl
67extern void insl(unsigned int port, void *buf, int sz); 70extern void insl(unsigned int port, void *buf, int sz);
68 71
72#define outsb outsb
69extern void outsb(unsigned int port, const void *buf, int sz); 73extern void outsb(unsigned int port, const void *buf, int sz);
74#define outsw outsw
70extern void outsw(unsigned int port, const void *buf, int sz); 75extern void outsw(unsigned int port, const void *buf, int sz);
76#define outsl outsl
71extern void outsl(unsigned int port, const void *buf, int sz); 77extern void outsl(unsigned int port, const void *buf, int sz);
72 78
73/* can't support writesb atm */ 79/* can't support writesb atm */
74extern void writesw(void __iomem *addr, const void *data, int wordlen); 80#define writesw writesw
75extern void writesl(void __iomem *addr, const void *data, int longlen); 81extern void writesw(volatile void __iomem *addr, const void *data, int wordlen);
82#define writesl writesl
83extern void writesl(volatile void __iomem *addr, const void *data, int longlen);
76 84
77/* can't support readsb atm */ 85/* can't support readsb atm */
78extern void readsw(const void __iomem *addr, void *data, int wordlen); 86#define readsw readsw
79extern void readsl(const void __iomem *addr, void *data, int longlen); 87extern void readsw(const volatile void __iomem *addr, void *data, int wordlen);
88
89#define readsl readsl
90extern void readsl(const volatile void __iomem *addr, void *data, int longlen);
80 91
81#endif 92#endif
diff --git a/arch/arm/mach-ebsa110/io.c b/arch/arm/mach-ebsa110/io.c
index 756cc377a73d..b57980b435fd 100644
--- a/arch/arm/mach-ebsa110/io.c
+++ b/arch/arm/mach-ebsa110/io.c
@@ -102,7 +102,7 @@ EXPORT_SYMBOL(__readb);
102EXPORT_SYMBOL(__readw); 102EXPORT_SYMBOL(__readw);
103EXPORT_SYMBOL(__readl); 103EXPORT_SYMBOL(__readl);
104 104
105void readsw(const void __iomem *addr, void *data, int len) 105void readsw(const volatile void __iomem *addr, void *data, int len)
106{ 106{
107 void __iomem *a = __isamem_convert_addr(addr); 107 void __iomem *a = __isamem_convert_addr(addr);
108 108
@@ -112,7 +112,7 @@ void readsw(const void __iomem *addr, void *data, int len)
112} 112}
113EXPORT_SYMBOL(readsw); 113EXPORT_SYMBOL(readsw);
114 114
115void readsl(const void __iomem *addr, void *data, int len) 115void readsl(const volatile void __iomem *addr, void *data, int len)
116{ 116{
117 void __iomem *a = __isamem_convert_addr(addr); 117 void __iomem *a = __isamem_convert_addr(addr);
118 118
@@ -122,7 +122,7 @@ void readsl(const void __iomem *addr, void *data, int len)
122} 122}
123EXPORT_SYMBOL(readsl); 123EXPORT_SYMBOL(readsl);
124 124
125void __writeb(u8 val, void __iomem *addr) 125void __writeb(u8 val, volatile void __iomem *addr)
126{ 126{
127 void __iomem *a = __isamem_convert_addr(addr); 127 void __iomem *a = __isamem_convert_addr(addr);
128 128
@@ -132,7 +132,7 @@ void __writeb(u8 val, void __iomem *addr)
132 __raw_writeb(val, a); 132 __raw_writeb(val, a);
133} 133}
134 134
135void __writew(u16 val, void __iomem *addr) 135void __writew(u16 val, volatile void __iomem *addr)
136{ 136{
137 void __iomem *a = __isamem_convert_addr(addr); 137 void __iomem *a = __isamem_convert_addr(addr);
138 138
@@ -142,7 +142,7 @@ void __writew(u16 val, void __iomem *addr)
142 __raw_writew(val, a); 142 __raw_writew(val, a);
143} 143}
144 144
145void __writel(u32 val, void __iomem *addr) 145void __writel(u32 val, volatile void __iomem *addr)
146{ 146{
147 void __iomem *a = __isamem_convert_addr(addr); 147 void __iomem *a = __isamem_convert_addr(addr);
148 148
@@ -157,7 +157,7 @@ EXPORT_SYMBOL(__writeb);
157EXPORT_SYMBOL(__writew); 157EXPORT_SYMBOL(__writew);
158EXPORT_SYMBOL(__writel); 158EXPORT_SYMBOL(__writel);
159 159
160void writesw(void __iomem *addr, const void *data, int len) 160void writesw(volatile void __iomem *addr, const void *data, int len)
161{ 161{
162 void __iomem *a = __isamem_convert_addr(addr); 162 void __iomem *a = __isamem_convert_addr(addr);
163 163
@@ -167,7 +167,7 @@ void writesw(void __iomem *addr, const void *data, int len)
167} 167}
168EXPORT_SYMBOL(writesw); 168EXPORT_SYMBOL(writesw);
169 169
170void writesl(void __iomem *addr, const void *data, int len) 170void writesl(volatile void __iomem *addr, const void *data, int len)
171{ 171{
172 void __iomem *a = __isamem_convert_addr(addr); 172 void __iomem *a = __isamem_convert_addr(addr);
173 173