Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 16755
b: refs/heads/master
c: b721243
h: refs/heads/master
i:
  16753: 3853c51
  16751: fe8e640
v: v3
  • Loading branch information
Lennert Buytenhek authored and Russell King committed Jan 4, 2006
1 parent 4196a3d commit 4954077
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 99 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1ad3a57d39001af413414c34feb5cd41d0f7917
refs/heads/master: b721243a6700b2ecc11f7b920d3d5d6718c5d148
98 changes: 0 additions & 98 deletions trunk/include/asm-arm/arch-ixp2000/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,102 +131,4 @@
#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

0 comments on commit 4954077

Please sign in to comment.