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

John Rigby john.rigby at linaro.org
Wed Oct 27 19:50:21 CEST 2010


On Wed, Oct 27, 2010 at 5:21 AM, Jason Liu <liu.h.jason at gmail.com> wrote:
> Hi, Stefano,
>
> 2010/10/27 Stefano Babic <sbabic at denx.de>:
>> On 10/27/2010 09:40 AM, Jason Liu wrote:
>>
>>> 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.
>>
>> Dropping the call is not the solution and works only on the MX51 if the
>> MAC is set into the fuse. Even on the MX51, this is not a general case:
>
> FSL will program all the fuse with MAC address before shipping every chip.
> This applies to all the i.mx family including imx25/35/51/53/50.
>
>> it should be always possible to set the ethaddr via the environment
>> without using the fuse.
>
> Yes, without call this function, the ethaddr evnviroment still working.
> It will use the MAC set via ethaddr instead of  the mac from FUSE. Net
> framework will do it.
>
>>
>> As sure, you should at least see a "Warning : MAC addresses don't match"
>> if the ethaddr is set to a different value as in the fuse.
>>
>> However, I do not yet understand why the address is not set: fec_probe
>> is called before doing something on the network and at this point the
>> address should be set from fuse.
>
> I have tested it and it's no need to add this function call. You can
> test it and see the result.
>
>>
>> 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
>> ====================================================================
>>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>

The patch fixes the particular case where you have no ethaddr in fuse,
nor persistent env.  The case is a board where the only persistent
storage is an SD card and you set load a boot script from file in a
FAT partition that has a setenv ethaddr in it.  The other case is if a
user sets the ethaddr at the command line it will not take effect
until reboot in the case of persistent env or never in the case of no
persistent env.


More information about the U-Boot mailing list