diff options
author | Thierry Reding <treding@nvidia.com> | 2014-10-01 08:13:33 -0400 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2014-11-10 09:15:34 -0500 |
commit | 2cd0f55961d87da617adae717737d13cb9518e7f (patch) | |
tree | bcc7d9fec972bbeea346fdb94a535dcfeb6105e6 /arch/arm | |
parent | bfb111ec255c82f2501d2898c5d26f39959c0111 (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.h | 25 | ||||
-rw-r--r-- | arch/arm/mach-ebsa110/io.c | 14 |
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); | |||
29 | u16 __readw(const volatile void __iomem *addr); | 29 | u16 __readw(const volatile void __iomem *addr); |
30 | u32 __readl(const volatile void __iomem *addr); | 30 | u32 __readl(const volatile void __iomem *addr); |
31 | 31 | ||
32 | void __writeb(u8 val, void __iomem *addr); | 32 | void __writeb(u8 val, volatile void __iomem *addr); |
33 | void __writew(u16 val, void __iomem *addr); | 33 | void __writew(u16 val, volatile void __iomem *addr); |
34 | void __writel(u32 val, void __iomem *addr); | 34 | void __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 | ||
65 | extern void insb(unsigned int port, void *buf, int sz); | 66 | extern void insb(unsigned int port, void *buf, int sz); |
67 | #define insw insw | ||
66 | extern void insw(unsigned int port, void *buf, int sz); | 68 | extern void insw(unsigned int port, void *buf, int sz); |
69 | #define insl insl | ||
67 | extern void insl(unsigned int port, void *buf, int sz); | 70 | extern void insl(unsigned int port, void *buf, int sz); |
68 | 71 | ||
72 | #define outsb outsb | ||
69 | extern void outsb(unsigned int port, const void *buf, int sz); | 73 | extern void outsb(unsigned int port, const void *buf, int sz); |
74 | #define outsw outsw | ||
70 | extern void outsw(unsigned int port, const void *buf, int sz); | 75 | extern void outsw(unsigned int port, const void *buf, int sz); |
76 | #define outsl outsl | ||
71 | extern void outsl(unsigned int port, const void *buf, int sz); | 77 | extern void outsl(unsigned int port, const void *buf, int sz); |
72 | 78 | ||
73 | /* can't support writesb atm */ | 79 | /* can't support writesb atm */ |
74 | extern void writesw(void __iomem *addr, const void *data, int wordlen); | 80 | #define writesw writesw |
75 | extern void writesl(void __iomem *addr, const void *data, int longlen); | 81 | extern void writesw(volatile void __iomem *addr, const void *data, int wordlen); |
82 | #define writesl writesl | ||
83 | extern 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 */ |
78 | extern void readsw(const void __iomem *addr, void *data, int wordlen); | 86 | #define readsw readsw |
79 | extern void readsl(const void __iomem *addr, void *data, int longlen); | 87 | extern void readsw(const volatile void __iomem *addr, void *data, int wordlen); |
88 | |||
89 | #define readsl readsl | ||
90 | extern 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); | |||
102 | EXPORT_SYMBOL(__readw); | 102 | EXPORT_SYMBOL(__readw); |
103 | EXPORT_SYMBOL(__readl); | 103 | EXPORT_SYMBOL(__readl); |
104 | 104 | ||
105 | void readsw(const void __iomem *addr, void *data, int len) | 105 | void 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 | } |
113 | EXPORT_SYMBOL(readsw); | 113 | EXPORT_SYMBOL(readsw); |
114 | 114 | ||
115 | void readsl(const void __iomem *addr, void *data, int len) | 115 | void 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 | } |
123 | EXPORT_SYMBOL(readsl); | 123 | EXPORT_SYMBOL(readsl); |
124 | 124 | ||
125 | void __writeb(u8 val, void __iomem *addr) | 125 | void __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 | ||
135 | void __writew(u16 val, void __iomem *addr) | 135 | void __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 | ||
145 | void __writel(u32 val, void __iomem *addr) | 145 | void __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); | |||
157 | EXPORT_SYMBOL(__writew); | 157 | EXPORT_SYMBOL(__writew); |
158 | EXPORT_SYMBOL(__writel); | 158 | EXPORT_SYMBOL(__writel); |
159 | 159 | ||
160 | void writesw(void __iomem *addr, const void *data, int len) | 160 | void 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 | } |
168 | EXPORT_SYMBOL(writesw); | 168 | EXPORT_SYMBOL(writesw); |
169 | 169 | ||
170 | void writesl(void __iomem *addr, const void *data, int len) | 170 | void 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 | ||