Re: [PATCH 1/4] of_net: Add NVMEM support to of_get_mac_address

From: Andrew Lunn
Date: Sat Apr 27 2019 - 12:29:02 EST


> /**
> - * Search the device tree for the best MAC address to use. 'mac-address' is
> - * checked first, because that is supposed to contain to "most recent" MAC
> - * address. If that isn't set, then 'local-mac-address' is checked next,
> - * because that is the default address. If that isn't set, then the obsolete
> - * 'address' is checked, just in case we're using an old device tree.
> + * Search the device tree for the best MAC address to use. Check NVME first as
> + * it should contain the proper MAC address, then 'mac-address' is checked
> + * next, because that is supposed to contain to "most recent" MAC address. If
> + * that isn't set, then 'local-mac-address' is checked next, because that is
> + * the default address. If that isn't set, then the obsolete 'address' is
> + * checked, just in case we're using an old device tree.

Hi Petr

I'm not sure this is the correct order. I would actually put NVMEM
after mac-address and local-mac-address. These are well established
and used. We don't want to break existing boards with a new
property. By putting NVMEM later, in order to make it used, any
existing mac-address and local-mac-address need to be removed, making
the developers actually think about what they are doing.

Andrew