diff options
author | Ben Gardiner <bengardiner@nanometrics.ca> | 2010-09-23 09:58:43 -0400 |
---|---|---|
committer | Ben Warren <biggerbadderben@gmail.com> | 2010-10-11 23:07:17 -0700 |
commit | 7b37a27e14975f32528552deed453b56a4149818 (patch) | |
tree | 97b76f279c64ac3be9b186060e4aab0e969fcc53 /board/davinci/sffsdr/sffsdr.c | |
parent | 042272a6f2fce3bf610a84cbfde3676b53c0d8dd (diff) | |
download | u-boot-imx-7b37a27e14975f32528552deed453b56a4149818.zip u-boot-imx-7b37a27e14975f32528552deed453b56a4149818.tar.gz u-boot-imx-7b37a27e14975f32528552deed453b56a4149818.tar.bz2 |
davinci_emac: davinci_eth_set_mac_addr to ->write_hwaddr
This patch proposes to migrate the davinci_emac driver to using the
eth_device->write_hwaddr function pointer as suggested by Ben Warren.
All the davinci boards had the behaviour, prior to this patch, of
sync'ing the environment variable enetaddr with the MAC address read
from non-volatile storage on boot -- when the two locations disagreed,
the environment variable value took precendence. This patch keeps the
same behaviour but lets eth_initialize take care of it.
This patch refactors davinci_emac setup in the boards so that the MAC
address is read from non-volatile storage into the environment variable
and then the environment variable value is use in eth_intialize. The
only exception is the direct call to davinci_eth_set_mac_addr made by
the da830evm board init which was changed into an assignment of the
enetaddr field.
Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Tested-by: Nick Thompson <nick.thompson@ge.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'board/davinci/sffsdr/sffsdr.c')
-rw-r--r-- | board/davinci/sffsdr/sffsdr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/board/davinci/sffsdr/sffsdr.c b/board/davinci/sffsdr/sffsdr.c index c24b9e1..657cf2b 100644 --- a/board/davinci/sffsdr/sffsdr.c +++ b/board/davinci/sffsdr/sffsdr.c @@ -141,7 +141,7 @@ int misc_init_r(void) /* Read Ethernet MAC address from EEPROM if available. */ if (sffsdr_read_mac_address(eeprom_enetaddr)) - dv_configure_mac_address(eeprom_enetaddr); + davinci_sync_env_enetaddr(eeprom_enetaddr); return(0); } |