All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 2/2 v2] net, fec_mxc: setup the mac address in the device registers
@ 2010-03-30 17:46 Heiko Schocher
  0 siblings, 0 replies; only message in thread
From: Heiko Schocher @ 2010-03-30 17:46 UTC (permalink / raw)
  To: u-boot

always setup mac address register with the contents in ethaddr.

This is not in line with u-boot design principle "not to
initalize not used devices", and maybe should go away,
if there is a solution for passing the mac address to arm
linux kernels.

Tested on the magnesium board.

Signed-off-by: Heiko Schocher <hs@denx.de>
---
- changes since v1 posted here:
  http://lists.denx.de/pipermail/u-boot/2010-March/069192.html

  - splitted in two patches as Wolfgang suggested

 drivers/net/fec_mxc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 98ff64b..6841208 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -752,9 +752,10 @@ static int fec_probe(bd_t *bd)
 	if (!eth_getenv_enetaddr("ethaddr", ethaddr)) {	
 		if (fec_get_hwaddr(edev, ethaddr) == 0) {
 			printf("got MAC address from EEPROM: %pM\n", ethaddr);
-			memcpy(edev->enetaddr, ethaddr, 6);
 		}
 	}
+	memcpy(edev->enetaddr, ethaddr, 6);
+	fec_set_hwaddr(edev);

 	return 0;
 }
-- 
1.6.2.5

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2010-03-30 17:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 17:46 [U-Boot] [PATCH 2/2 v2] net, fec_mxc: setup the mac address in the device registers Heiko Schocher

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.