diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-02-11 19:18:41 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-03-20 22:39:11 +0100 |
commit | 6bacfa6a8e9b264d37c1262fc1f3e948d1feab81 (patch) | |
tree | 0e5d0e6e20b9265f68bc67c4bb0930566d05c658 /cpu/mpc8260/ether_scc.c | |
parent | 03f3d8d3b39cf85c0ce7ca903b436701e8aa610b (diff) | |
download | u-boot-imx-6bacfa6a8e9b264d37c1262fc1f3e948d1feab81.zip u-boot-imx-6bacfa6a8e9b264d37c1262fc1f3e948d1feab81.tar.gz u-boot-imx-6bacfa6a8e9b264d37c1262fc1f3e948d1feab81.tar.bz2 |
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 <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: John Rigby <jrigby@freescale.com>
CC: Stefan Roese <sr@denx.de>
Diffstat (limited to 'cpu/mpc8260/ether_scc.c')
-rw-r--r-- | cpu/mpc8260/ether_scc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cpu/mpc8260/ether_scc.c b/cpu/mpc8260/ether_scc.c index 3671ef1..432111d 100644 --- a/cpu/mpc8260/ether_scc.c +++ b/cpu/mpc8260/ether_scc.c @@ -199,6 +199,7 @@ static int sec_init(struct eth_device *dev, bd_t *bis) volatile immap_t *immr = (immap_t *)CONFIG_SYS_IMMR; scc_enet_t *pram_ptr; uint dpaddr; + uchar ea[6]; rxIdx = 0; txIdx = 0; @@ -261,11 +262,10 @@ static int sec_init(struct eth_device *dev, bd_t *bis) pram_ptr->sen_gaddr3 = 0x0; /* Group Address Filter 3 (unused) */ pram_ptr->sen_gaddr4 = 0x0; /* Group Address Filter 4 (unused) */ -# define ea bis->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) */ |