[U-Boot-Users] [patch] MIPS: AMD Alchemy au1x00 ethernet initialization in cpu/mips/au1x00_eth.c
Joseph Chiu
joseph at omnilux.net
Wed Feb 16 03:18:49 CET 2005
Hi,
On u-boot bootloader 1.1.2 on AMD Alchemy Au1x00:
The au1x00_mac.c assumes that ethernet transmit always starts with transmit buffer 0. This is not necessarily true (in the event of a warm reboot).
This little patch fixes that and prevents (reduces?) transmit timeouts that you might see when you're repeatedly warm-rebooting your board during development.
Cheers,
Joseph Chiu
www.omnilux.net
LC_ALL=C TZ=UTC0 diff -Naur u-boot-1.1.2.orig/cpu/mips/au1x00_eth.c u-boot-1.1.2.new/cpu/mips/au1x00_eth.c
--- u-boot-1.1.2.orig/cpu/mips/au1x00_eth.c Fri Jan 2 15:01:32 2004
+++ u-boot-1.1.2.new/cpu/mips/au1x00_eth.c Wed Feb 16 02:10:27 2005
@@ -167,9 +167,6 @@
(volatile mac_fifo_t*)(MAC0_RX_DMA_ADDR+MAC_RX_BUFF0_STATUS);
int i;
- next_tx = 0;
- next_rx = 0;
-
/* We have to enable clocks before releasing reset */
*macen = MAC_EN_CLOCK_ENABLE;
udelay(10);
@@ -186,6 +183,9 @@
fifo_rx[i].addr = (virt_to_phys(NetRxPackets[i]))|RX_DMA_ENABLE;
}
+ next_tx = (fifo_tx[0].addr & 0x0c )>>2;
+ next_rx = (fifo_rx[0].addr & 0x0c )>>2;
+
/* Put mac addr in little endian */
#define ea eth_get_dev()->enetaddr
*mac_addr_high = (ea[5] << 8) | (ea[4] ) ;
More information about the U-Boot
mailing list