diff options
author | Mike Frysinger <vapier@gentoo.org> | 2009-02-11 19:01:26 -0500 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2009-03-20 22:39:10 +0100 |
commit | d3f871482f06f6a4eaf4a3fafde84846bad87b4f (patch) | |
tree | 992dd06b484d20eabb22d2a3d549b661f85dc9ea /drivers/net/rtl8019.c | |
parent | b6b4625d175019e387e5b0f65a17322a78f6bb90 (diff) | |
download | u-boot-imx-d3f871482f06f6a4eaf4a3fafde84846bad87b4f.zip u-boot-imx-d3f871482f06f6a4eaf4a3fafde84846bad87b4f.tar.gz u-boot-imx-d3f871482f06f6a4eaf4a3fafde84846bad87b4f.tar.bz2 |
drivers/net/: 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 drivers that get converted here:
3c589
4xx_enet
dc2114x
dm9000x
enc28j60
fsl_mcdmafec
ks8695eth
mcffec
rtl8019
rtl8169
s3c4510b_eth
xilinx_emac
xilinx_emaclite
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
CC: Ben Warren <biggerbadderben@gmail.com>
CC: Rolf Offermanns <rof@sysgo.de>
CC: Stefan Roese <sr@denx.de>
CC: Sascha Hauer <saschahauer@web.de>
CC: TsiChung Liew <Tsi-Chung.Liew@freescale.com>
CC: Greg Ungerer <greg.ungerer@opengear.com>
CC: Xue Ligong <lgxue@hotmail.com>
CC: Masami Komiya <mkomiya@sonare.it>
CC: Curt Brune <curt@cucy.com>
CC: Michal SIMEK <monstr@monstr.eu>
Diffstat (limited to 'drivers/net/rtl8019.c')
-rw-r--r-- | drivers/net/rtl8019.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/rtl8019.c b/drivers/net/rtl8019.c index 3ddf917..f516afe 100644 --- a/drivers/net/rtl8019.c +++ b/drivers/net/rtl8019.c @@ -91,6 +91,7 @@ void eth_halt (void) int eth_init (bd_t * bd) { + uchar enetaddr[6]; eth_reset (); put_reg (RTL8019_COMMAND, RTL8019_PAGE0STOP); put_reg (RTL8019_DATACONFIGURATION, 0x48); @@ -105,12 +106,13 @@ int eth_init (bd_t * bd) put_reg (RTL8019_INTERRUPTSTATUS, 0xff); put_reg (RTL8019_INTERRUPTMASK, 0x11); /*b; */ put_reg (RTL8019_COMMAND, RTL8019_PAGE1STOP); - put_reg (RTL8019_PHYSICALADDRESS0, bd->bi_enetaddr[0]); - put_reg (RTL8019_PHYSICALADDRESS1, bd->bi_enetaddr[1]); - put_reg (RTL8019_PHYSICALADDRESS2, bd->bi_enetaddr[2]); - put_reg (RTL8019_PHYSICALADDRESS3, bd->bi_enetaddr[3]); - put_reg (RTL8019_PHYSICALADDRESS4, bd->bi_enetaddr[4]); - put_reg (RTL8019_PHYSICALADDRESS5, bd->bi_enetaddr[5]); + eth_getenv_enetaddr("ethaddr", enetaddr); + put_reg (RTL8019_PHYSICALADDRESS0, enetaddr[0]); + put_reg (RTL8019_PHYSICALADDRESS1, enetaddr[1]); + put_reg (RTL8019_PHYSICALADDRESS2, enetaddr[2]); + put_reg (RTL8019_PHYSICALADDRESS3, enetaddr[3]); + put_reg (RTL8019_PHYSICALADDRESS4, enetaddr[4]); + put_reg (RTL8019_PHYSICALADDRESS5, enetaddr[5]); put_reg (RTL8019_MULTIADDRESS0, 0x00); put_reg (RTL8019_MULTIADDRESS1, 0x00); put_reg (RTL8019_MULTIADDRESS2, 0x00); |