diff options
-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 |