On Tuesday, April 26, 2011 00:23:47 Michael Spang wrote: > On Mon, Apr 25, 2011 at 7:37 AM, Tabi Timur-B04825 wrote: > > On Sun, Apr 24, 2011 at 6:50 PM, Wolfgang Denk wrote: > >> And please add documentation for the new CONFIG_PRESERVE_LOCAL_MAC to > >> the README. > > > > We have something similar already on Freescale parts, but it does > > sometimes cause problems. If the environment ethaddr is already set, > > it is left alone. Otherwise, the MAC address is read from EEPROM. > > > > So we could use CONFIG_PRESERVE_LOCAL_MAC to alter this behavior (i.e. > > always use the EEPROM). However, the current default is already > > CONFIG_PRESERVE_LOCAL_MAC, so can we change this to something like > > CONFIG_OVERRIDE_LOCAL_MAC? > > I don't think the option you want is the same. If there's a MAC in the > environment, I want to use it. Otherwise, I want U-Boot to leave the > MAC alone because the manufacturer assigned MAC was written to the > interface's registers before U-Boot started.
so implement this in your board file in misc_init_r or board_eth_init. have the code do something like: uchar enetaddr[6]; if (!eth_getenv_enetaddr("ethaddr", enetaddr)) { /* ... read current MAC out of the driver's registers ... */ eth_setenv_enetaddr("ethaddr", enetaddr); } then you dont need ugly config hacks in random drivers -mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot