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/mpc5xxx | |
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/mpc5xxx')
-rw-r--r-- | cpu/mpc5xxx/cpu.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cpu/mpc5xxx/cpu.c b/cpu/mpc5xxx/cpu.c index 9c6ab76..ad5ef8e 100644 --- a/cpu/mpc5xxx/cpu.c +++ b/cpu/mpc5xxx/cpu.c @@ -121,6 +121,7 @@ void ft_cpu_setup(void *blob, bd_t *bd) int div = in_8((void*)CONFIG_SYS_MBAR + 0x204) & 0x0020 ? 8 : 4; char * cpu_path = "/cpus/" OF_CPU; #ifdef CONFIG_MPC5xxx_FEC + uchar *enetaddr[6]; char * eth_path = "/" OF_SOC "/ethernet@3000"; #endif @@ -131,8 +132,9 @@ void ft_cpu_setup(void *blob, bd_t *bd) do_fixup_by_path_u32(blob, "/" OF_SOC, "system-frequency", bd->bi_busfreq*div, 1); #ifdef CONFIG_MPC5xxx_FEC - do_fixup_by_path(blob, eth_path, "mac-address", bd->bi_enetaddr, 6, 0); - do_fixup_by_path(blob, eth_path, "local-mac-address", bd->bi_enetaddr, 6, 0); + eth_getenv_enetaddr("ethaddr", enetaddr); + do_fixup_by_path(blob, eth_path, "mac-address", enetaddr, 6, 0); + do_fixup_by_path(blob, eth_path, "local-mac-address", enetaddr, 6, 0); #endif } #endif |