[ARM] 3223/1: remove ixdp2x01 cs89x0 hack
authorLennert Buytenhek <buytenh@wantstofly.org>
Wed, 4 Jan 2006 17:17:15 +0000 (17:17 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 4 Jan 2006 17:17:15 +0000 (17:17 +0000)
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>
include/asm-arm/arch-ixp2000/io.h

index 7fbcdf9..c0ff2c6 100644 (file)
 #endif
 
 
-#ifdef CONFIG_ARCH_IXDP2X01
-/*
- * This is an ugly hack but the CS8900 on the 2x01's does not sit in any sort
- * of "I/O space" and is just direct mapped into a 32-bit-only addressable
- * bus. The address space for this bus is such that we can't really easily
- * make it contiguous to the PCI I/O address range, and it also does not
- * need swapping like PCI addresses do (IXDP2x01 is a BE platform).
- * B/C of this we can't use the standard in/out functions and need to
- * runtime check if the incoming address is a PCI address or for
- * the CS89x0.
- */
-#undef inw
-#undef outw
-#undef insw
-#undef outsw
-
-#include <asm/mach-types.h>
-
-static inline void insw(u32 ptr, void *buf, int length)
-{
-       register volatile u32 *port = (volatile u32 *)ptr;
-
-       /*
-        * Is this cycle meant for the CS8900?
-        */
-       if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 
-               (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
-                ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
-               u8 *buf8 = (u8*)buf;
-               register u32 tmp32;
-
-               do {
-                       tmp32 = *port;
-                       *buf8++ = (u8)tmp32;
-                       *buf8++ = (u8)(tmp32 >> 8);
-               } while(--length);
-
-               return;
-       }
-
-       __raw_readsw(alignw(___io(ptr)),buf,length);
-}
-
-static inline void outsw(u32 ptr, void *buf, int length)
-{
-       register volatile u32 *port = (volatile u32 *)ptr;
-
-       /*
-        * Is this cycle meant for the CS8900?
-        */
-       if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 
-               (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
-                ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
-               register u32 tmp32;
-               u8 *buf8 = (u8*)buf;
-               do {
-                       tmp32 = *buf8++;
-                       tmp32 |= (*buf8++) << 8;
-                       *port = tmp32;
-               } while(--length);
-               return;
-       }
-
-       __raw_writesw(alignw(___io(ptr)),buf,length);
-}
-
-
-static inline u16 inw(u32 ptr)
-{
-       register volatile u32 *port = (volatile u32 *)ptr;
-
-       /*
-        * Is this cycle meant for the CS8900?
-        */
-       if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 
-               (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
-                ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
-               return (u16)(*port);  
-       }
-
-       return __raw_readw(alignw(___io(ptr)));
-}
-
-static inline void outw(u16 value, u32 ptr)
-{
-       register volatile u32 *port = (volatile u32 *)ptr;
-
-       if ((machine_is_ixdp2401() || machine_is_ixdp2801()) && 
-               (((u32)port >= (u32)IXDP2X01_CS8900_VIRT_BASE) &&
-                ((u32)port <= (u32)IXDP2X01_CS8900_VIRT_END))) {
-               *port = value;  
-               return;
-       }
-
-       __raw_writew((value),alignw(___io(ptr)));
-}
-#endif /* IXDP2x01 */
-
 #endif