[U-Boot] [PATCH V3 07/11] fec_mxc: add support for MX51 processor

Stefano Babic sbabic at denx.de
Mon Feb 1 12:43:44 CET 2010


Ben Warren wrote:
> Hi Stefano,

Hi Ben,

> Your driver shouldn't touch the environment (i.e. no getenv/setenv
> calls).  Just save the value from ROM into edev->enetaddr, like this:
> if (fec_get_hwaddr(edev, ethaddr) == 0)
>    memcpy(edev->enetaddr, ethaddr, 6);
> 
> The core net code will take care of overwriting this if there's a value
> in the environment.  Please see README.enetaddr if this isn't clear.

I see. This means there is another problem in this driver. The mac
address is set only once in the probe(), but as you describes, it must
be done in the init() entry point, else it cannot be overwritten by the
value of ethaddr. I will move the setting of the mac address in my next
submit, too.

Best regards,
Stefano

-- 
=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================


More information about the U-Boot mailing list