[U-Boot] [PATCH 1/2] imx: Get fec mac address from fuse

Jason Liu liu.h.jason at gmail.com
Wed Oct 27 09:40:04 CEST 2010


2010/10/27 Stefano Babic <sbabic at denx.de>:
> On 10/26/2010 12:35 PM, Jason Liu wrote:
>>>>  static int fec_set_hwaddr(struct eth_device *dev)
>>>> @@ -414,9 +410,6 @@ static int fec_init(struct eth_device *dev, bd_t* bd)
>>>>       uint32_t base;
>>>>       struct fec_priv *fec = (struct fec_priv *)dev->priv;
>>>>
>>>> -     /* Initialize MAC address */
>>>> -     fec_set_hwaddr(dev);
>>>> -
>>>
>>> Not sure. Why is this call removed ? We have changed the storage for the
>>> MAC address, but we need always to set the FEC controller. What is the
>>> reason to drop it ?
>>
>> It's because, it will print some floating  value  of MAC address when
>> bootup and in fact, we don't need re-set it again here..
>> The net framework will do that. This is why I remove. it.
>
> The call was added one month ago. It sets the MAC address any time the
> network is used, to be sure that the correct MAC is taken even if the
> ethaddr variable is changed. You can take a look at the patch:
>
> http://www.mail-archive.com/u-boot@lists.denx.de/msg37629.html


Yes, I haved looked it before and I also tested this patch on
MX51babbage 3.0 board. It will printting some confusing information
with floating value of MAC address when the board boot up after you
set the ethaddr enviorment. The reason is that, when it first call
fec_init, the eth address of dev is not intialized and then it using
the floating memory value.


>
> Best regards,
> Stefano Babic
>
> --
> =====================================================================
> 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