]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
MIPS: Implement ethernet halt for au1x00
authorThomas Lange <thomas@corelatus.se>
Fri, 24 Apr 2009 14:22:16 +0000 (16:22 +0200)
committerShinya Kuribayashi <skuribay@pobox.com>
Sat, 16 May 2009 00:20:03 +0000 (09:20 +0900)
Implement ethernet halt() by putting MAC0 in reset.
If we do not do this, we will get memory corruption
when ethernet frames are received during early OS boot.

Signed-off-by: Thomas Lange <thomas@corelatus.se>
Signed-off-by: Shinya Kuribayashi <skuribay@pobox.com>
cpu/mips/au1x00_eth.c

index 6272a3aac119dd34be822b0391fd680e844fb596..5074997a29b57505e76c9acac8a3b757ff67ef96 100644 (file)
@@ -276,6 +276,10 @@ static int au1x00_init(struct eth_device* dev, bd_t * bd){
 }
 
 static void au1x00_halt(struct eth_device* dev){
+       volatile u32 *macen = (volatile u32*)MAC0_ENABLE;
+
+       /* Put MAC0 in reset */
+       *macen = 0;
 }
 
 int au1x00_enet_initialize(bd_t *bis){