public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] MIPS: Implement ethernet halt for au1x00
@ 2009-04-24 14:22 Thomas Lange
  2009-05-03  1:20 ` Shinya Kuribayashi
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Lange @ 2009-04-24 14:22 UTC (permalink / raw)
  To: u-boot

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>
---
 cpu/mips/au1x00_eth.c |    4 ++++
 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){
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-05-03  1:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-24 14:22 [U-Boot] [PATCH] MIPS: Implement ethernet halt for au1x00 Thomas Lange
2009-05-03  1:20 ` Shinya Kuribayashi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox