[U-Boot] [PATCH v2 1/3] mx28: Let imx_get_mac_from_fuse be common for mx28

Stefano Babic sbabic at denx.de
Fri Dec 16 11:55:01 CET 2011


On 16/12/2011 11:39, Marek Vasut wrote:

>>
>> Hi Marek,
> 
> Hi Stefano,
> 
> DISCLAIMER: I'm terribly tired today, had early class.

ok, I understand..;-)

> 
> You disable fuses and use ethaddr. Why do we need them? We don't, but the 
> hardware is in the CPU and someone might use it so let's support it.

Exactly - see also othe IMX SOCs.

>> In a standard way, the environment must be adapted for each board to
>> store the MAC address in the ethaddr variable. The reason to get the MAC
>> directly from the hardware is that it is not required a specific initial
>> setup for each board, and that simplifies the production and the
>> delivery of the boards.
> 
> Sure, but the OCOTP capacity here is limited. But there was approach from 
> Fabio/me how to make the OCOTP good enough for two NICs even.

And this is nice.

> * The idea is to let user configure the top 2 bytes per-device (which is the 
> most likely case).

This is exactly what I meant.

> * Introduce mac_modify(int fec, char *mac) function, which will be called from 
> imx_get_mac_from_fuse()
> * The function will adjust the MAC, for example by setting top two bytes to 
> preconfigured data, bottom four bytes from OCOTP and the last bit of the MAC 
> from "int fec", which is 0 for FEC0 and 1 for FEC1. This should be sufficient 
> for most people.

Exactly !


> * The function will be weak so it can be overridden to your hearts content.

Right !

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