summaryrefslogtreecommitdiff
path: root/cpu/mips
diff options
context:
space:
mode:
authorThomas Lange <thomas@corelatus.se>2009-04-24 16:22:16 +0200
committerShinya Kuribayashi <skuribay@pobox.com>2009-05-16 09:20:03 +0900
commit87423d740b91329b8d1d0b73cafd6930993b558a (patch)
tree3db41297628c6a95ea42f4ed6e44af3385da15bd /cpu/mips
parenta2e0ffcf2d9a22c582a93e84a4bef20fd3877f47 (diff)
downloadu-boot-imx-87423d740b91329b8d1d0b73cafd6930993b558a.zip
u-boot-imx-87423d740b91329b8d1d0b73cafd6930993b558a.tar.gz
u-boot-imx-87423d740b91329b8d1d0b73cafd6930993b558a.tar.bz2
MIPS: Implement ethernet halt for au1x00
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>
Diffstat (limited to 'cpu/mips')
-rw-r--r--cpu/mips/au1x00_eth.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cpu/mips/au1x00_eth.c b/cpu/mips/au1x00_eth.c
index 6272a3a..5074997 100644
--- a/cpu/mips/au1x00_eth.c
+++ b/cpu/mips/au1x00_eth.c
@@ -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){