From 6bacfa6a8e9b264d37c1262fc1f3e948d1feab81 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Wed, 11 Feb 2009 19:18:41 -0500 Subject: cpu/: get mac address from environment The environment is the canonical storage location of the mac address, so we're killing off the global data location and moving everything to querying the env directly. The cpus that get converted here: at91rm9200 mpc512x mpc5xxx mpc8260 mpc8xx ppc4xx Signed-off-by: Mike Frysinger CC: Ben Warren CC: John Rigby CC: Stefan Roese --- cpu/mpc512x/cpu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'cpu/mpc512x') diff --git a/cpu/mpc512x/cpu.c b/cpu/mpc512x/cpu.c index b9069b0..be532af 100644 --- a/cpu/mpc512x/cpu.c +++ b/cpu/mpc512x/cpu.c @@ -148,15 +148,17 @@ static void old_ft_cpu_setup(void *blob, bd_t *bd) * avoid fixing up by path because that * produces scary error messages */ + uchar enetaddr[6]; /* * old device trees have ethernet nodes with * device_type = "network" */ + eth_getenv_enetaddr("ethaddr", enetaddr); do_fixup_by_prop(blob, "device_type", "network", 8, - "local-mac-address", bd->bi_enetaddr, 6, 0); + "local-mac-address", enetaddr, 6, 0); do_fixup_by_prop(blob, "device_type", "network", 8, - "address", bd->bi_enetaddr, 6, 0); + "address", enetaddr, 6, 0); /* * old device trees have soc nodes with * device_type = "soc" -- cgit v1.1