diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2006-01-04 12:17:15 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-01-04 12:17:15 -0500 |
commit | b721243a6700b2ecc11f7b920d3d5d6718c5d148 (patch) | |
tree | 13460896a686547d627c12d37bc8be1a5a61b32c /include/asm-arm | |
parent | b1ad3a57d39001af413414c34feb5cd41d0f7917 (diff) |
[ARM] 3223/1: remove ixdp2x01 cs89x0 hack
Patch from Lennert Buytenhek
Remove the ixdp2x01 cs89x0 hack from ixp2000's io implementation.
Since the cs89x0 driver has been made properly aware of the odd way
the cs89x0 is hooked up on the ixdp2x01, we don't need this hack
anymore.
Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>
Signed-off-by: Deepak Saxena <dsaxena@plexity.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/arch-ixp2000/io.h | 98 |
1 files changed, 0 insertions, 98 deletions
diff --git a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h index 7fbcdf9931ee..c0ff2c6c66e7 100644 --- a/include/asm-arm/arch-ixp2000/io.h +++ b/include/asm-arm/arch-ixp2000/io.h | |||
@@ -131,102 +131,4 @@ | |||
131 | #endif | 131 | #endif |
132 | 132 | ||
133 | 133 | ||
134 | #ifdef CONFIG_ARCH_IXDP2X01 | ||
135 | /* | ||
136 | * This is an ugly hack but the CS8900 on the 2x01's does not sit in any sort | ||
137 | * of "I/O space" and is just direct mapped into a 32-bit-only addressable | ||
138 | * bus. The address space for this bus is such that we can't really easily | ||
139 | * make it contiguous to the PCI I/O address range, and it also does not | ||
140 | * need swapping like PCI addresses do (IXDP2x01 is a BE platform). | ||
141 | * B/C of this we can't use the standard in/out functions and need to | ||
142 | * runtime check if the incoming address is a PCI address or for | ||
143 | * the CS89x0. | ||
144 | */ | ||
145 | #undef inw | ||
146 | #undef outw | ||
147 | #undef insw | ||
148 | #undef outsw | ||
149 | |||
150 | #include <asm/mach-types.h> | ||
151 | |||
152 | static inline void insw(u32 ptr, void *buf, int length) | ||
153 | { | ||
154 | register volatile u32 *port = (volatile u32 *)ptr; | ||
155 | |||
156 | /* | ||
157 | * Is this cycle meant for the CS8900? | ||
158 | */ | ||
159 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && | ||
160 | (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) && | ||
161 | ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) { | ||
162 | u8 *buf8 = (u8*)buf; | ||
163 | register u32 tmp32; | ||
164 | |||
165 | do { | ||
166 | tmp32 = *port; | ||
167 | *buf8++ = (u8)tmp32; | ||
168 | *buf8++ = (u8)(tmp32 >> 8); | ||
169 | } while(--length); | ||
170 | |||
171 | return; | ||
172 | } | ||
173 | |||
174 | __raw_readsw(alignw(___io(ptr)),buf,length); | ||
175 | } | ||
176 | |||
177 | static inline void outsw(u32 ptr, void *buf, int length) | ||
178 | { | ||
179 | register volatile u32 *port = (volatile u32 *)ptr; | ||
180 | |||
181 | /* | ||
182 | * Is this cycle meant for the CS8900? | ||
183 | */ | ||
184 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && | ||
185 | (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) && | ||
186 | ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) { | ||
187 | register u32 tmp32; | ||
188 | u8 *buf8 = (u8*)buf; | ||
189 | do { | ||
190 | tmp32 = *buf8++; | ||
191 | tmp32 |= (*buf8++) << 8; | ||
192 | *port = tmp32; | ||
193 | } while(--length); | ||
194 | return; | ||
195 | } | ||
196 | |||
197 | __raw_writesw(alignw(___io(ptr)),buf,length); | ||
198 | } | ||
199 | |||
200 | |||
201 | static inline u16 inw(u32 ptr) | ||
202 | { | ||
203 | register volatile u32 *port = (volatile u32 *)ptr; | ||
204 | |||
205 | /* | ||
206 | * Is this cycle meant for the CS8900? | ||
207 | */ | ||
208 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && | ||
209 | (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) && | ||
210 | ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) { | ||
211 | return (u16)(*port); | ||
212 | } | ||
213 | |||
214 | return __raw_readw(alignw(___io(ptr))); | ||
215 | } | ||
216 | |||
217 | static inline void outw(u16 value, u32 ptr) | ||
218 | { | ||
219 | register volatile u32 *port = (volatile u32 *)ptr; | ||
220 | |||
221 | if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && | ||
222 | (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) && | ||
223 | ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) { | ||
224 | *port = value; | ||
225 | return; | ||
226 | } | ||
227 | |||
228 | __raw_writew((value),alignw(___io(ptr))); | ||
229 | } | ||
230 | #endif /* IXDP2x01 */ | ||
231 | |||
232 | #endif | 134 | #endif |