[PATCH] ARM: imx6: init enet MAC address

fugang.duan at freescale.com fugang.duan at freescale.com
Thu May 22 00:34:36 PDT 2014


From: Shawn Guo <shawn.guo at freescale.com>
Data: Thursday, May 22, 2014 2:13 PM

>To: Duan Fugang-B38611
>Cc: Li Frank-B20596; linux-arm-kernel at lists.infradead.org;
>kernel at pengutronix.de
>Subject: Re: [PATCH] ARM: imx6: init enet MAC address
>
>On Tue, May 20, 2014 at 02:11:06PM +0800, Fugang Duan wrote:
>> Enet get MAC address order:
>> From module parameters or kernel command line -> device tree -> pfuse
>> -> mac registers set by bootloader -> random mac address.
>>
>> When there have no "fec.macaddr" parameters set in kernel command
>> line, enet driver get MAC address from device tree. And then if the
>> MAC address set in device tree and is valid, enet driver get MAC
>> address from device tree. Otherwise, enet get MAC address from pfuse.
>> So, in the condition, update the MAC address (read from pfuse) to
>> device tree.
>>
>> Signed-off-by: Fugang Duan <B38611 at freescale.com>
>
>I would think this is a board level configuration than SoC one.  Though
>the register name in Reference Manual, OCOTP_MAC0 and OCOTP_MAC1,
>recommends that these fuse bits can be used to store MAC address, it's
>really up to board designers how to use these fuse bits, e.g. how the MAC
>bytes will be stored in these 64 fuse bits, or on some board designs which
>do not have Ethernet interface at all, these bits can totally be used for
>other purpose.
>
>So to me, it's inappropriate to assume that these fuse bits always hold
>MAC address, and do this setup in kernel unconditionally for every board.
>I think it's more reasonable to do this setup in bootloader, which should
>be more board specific and can understand these fuse bits better.
>
>Shawn

Shawn,  if so, we don't need to upstream the patch in kernel.
Thanks for your information.

Andy



More information about the linux-arm-kernel mailing list