diff options
author | wdenk <wdenk> | 2004-11-02 13:00:33 (GMT) |
---|---|---|
committer | wdenk <wdenk> | 2004-11-02 13:00:33 (GMT) |
commit | 1f6d4258c25bc41ce8404d3485ace1989f796a2f (patch) | |
tree | 0d8f04fd02a0c4294fa919bd3a0c62c95713ed39 /drivers/smc91111.c | |
parent | 983fda8391fa0ccfd4e0fd0bfb5a5e662e07b222 (diff) | |
download | u-boot-1f6d4258c25bc41ce8404d3485ace1989f796a2f.tar.xz |
Work around for Ethernet problems on Xaeniax board
Diffstat (limited to 'drivers/smc91111.c')
-rw-r--r-- | drivers/smc91111.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/drivers/smc91111.c b/drivers/smc91111.c index 44ce60b..69cbb17 100644 --- a/drivers/smc91111.c +++ b/drivers/smc91111.c @@ -640,8 +640,15 @@ again: } /* we have a packet address, so tell the card to use it */ +#ifndef CONFIG_XAENIAX SMC_outb (packet_no, PN_REG); - +#else + /* On Xaeniax board, we can't use SMC_outb here because that way + * the Allocate MMU command will end up written to the command register + * as well, which will lead to a problem. + */ + SMC_outl (packet_no << 16, 0); +#endif /* do not write new ptr value if Write data fifo not empty */ while ( saved_ptr & PTR_NOTEMPTY ) printf ("Write data fifo not empty!\n"); @@ -702,7 +709,9 @@ again: /* release packet */ /* no need to release, MMU does that now */ - /* SMC_outw (MC_FREEPKT, MMU_CMD_REG); */ +#ifdef CONFIG_XAENIAX + SMC_outw (MC_FREEPKT, MMU_CMD_REG); +#endif /* wait for MMU getting ready (low) */ while (SMC_inw (MMU_CMD_REG) & MC_BUSY) { @@ -722,7 +731,9 @@ again: /* release packet */ /* no need to release, MMU does that now */ - /* SMC_outw (MC_FREEPKT, MMU_CMD_REG); */ +#ifdef CONFIG_XAENIAX + SMC_outw (MC_FREEPKT, MMU_CMD_REG); +#endif /* wait for MMU getting ready (low) */ while (SMC_inw (MMU_CMD_REG) & MC_BUSY) { @@ -735,7 +746,15 @@ again: } /* restore previously saved registers */ +#ifndef CONFIG_XAENIAX SMC_outb( saved_pnr, PN_REG ); +#else + /* On Xaeniax board, we can't use SMC_outb here because that way + * the Allocate MMU command will end up written to the command register + * as well, which will lead to a problem. + */ + SMC_outl(saved_pnr << 16, 0); +#endif SMC_outw( saved_ptr, PTR_REG ); return length; @@ -913,7 +932,15 @@ static int smc_rcv() udelay(1); /* Wait until not busy */ /* restore saved registers */ +#ifndef CONFIG_XAENIAX SMC_outb( saved_pnr, PN_REG ); +#else + /* On Xaeniax board, we can't use SMC_outb here because that way + * the Allocate MMU command will end up written to the command register + * as well, which will lead to a problem. + */ + SMC_outl( saved_pnr << 16, 0); +#endif SMC_outw( saved_ptr, PTR_REG ); if (!is_error) { |