MIPS: AMD Alchemy au1x00 ethernet initialization in cpu/mips/au1x00_eth.c
PATCH 1/1 MIPS: AMD Alchemy au1x00 ethernet initialization in cpu/mips/au1x00_eth.c
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
cpu/mips/au1x00_eth.c +3 -3
@@ -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 ] ) ;
PATCH 1/1 MIPS: AMD Alchemy au1x00 ethernet initialization in cpu/mips/au1x00_eth.c
Quoted 2 lines
The
au1x00_mac.cassumes that ethernet transmit always starts with transmit buffer 0. This is not necessarily true (in the event of a warm reboot).
A patch for this was already submitted on 1/7/05.
PATCH 1/1 MIPS: AMD Alchemy au1x00 ethernet initialization in cpu/mips/au1x00_eth.c
In reply to Joseph ChiuQuoted 10 lines · In message <[email protected]>…
On u-boot bootloader 1.1.2 on AMD Alchemy Au1x00:
The
au1x00_mac.cassumes 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.
A different fix has been chacked in recently. Please have a look and chek if it's ok with you, too.
Best regards,
Wolfgang Denk
Signature · 4 lines
Software Engineering: Embedded and Realtime Systems, Embedded Linux Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de You're dead, Jim. -- McCoy, "Amok Time", stardate 3372.7