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 --- post/cpu/mpc8xx/ether.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'post/cpu') diff --git a/post/cpu/mpc8xx/ether.c b/post/cpu/mpc8xx/ether.c index 5622cb7d2a..fe6c39eb3c 100644 --- a/post/cpu/mpc8xx/ether.c +++ b/post/cpu/mpc8xx/ether.c @@ -110,6 +110,7 @@ static RTXBD *rtx; static void scc_init (int scc_index) { bd_t *bd = gd->bd; + uchar ea[6]; static int proff[] = { PROFF_SCC1, PROFF_SCC2, PROFF_SCC3, PROFF_SCC4 }; @@ -296,11 +297,10 @@ CPM_CR_CH_SCC4 }; pram_ptr->sen_gaddr3 = 0x0; /* Group Address Filter 3 (unused) */ pram_ptr->sen_gaddr4 = 0x0; /* Group Address Filter 4 (unused) */ -#define ea bd->bi_enetaddr + eth_getenv_enetaddr("ethaddr", ea); pram_ptr->sen_paddrh = (ea[5] << 8) + ea[4]; pram_ptr->sen_paddrm = (ea[3] << 8) + ea[2]; pram_ptr->sen_paddrl = (ea[1] << 8) + ea[0]; -#undef ea pram_ptr->sen_pper = 0x0; /* Persistence (unused) */ pram_ptr->sen_iaddr1 = 0x0; /* Individual Address Filter 1 (unused) */ -- cgit v1.2.1