of_net: add property "nvmem-mac-address" for of_get_mac_addr()
If MAC address read from nvmem cell and it is valid mac address, .of_get_mac_addr_nvmem() add new property "nvmem-mac-address" in ethernet node. Once user call .of_get_mac_address() to get MAC address again, it can read valid MAC address from device tree in directly. Signed-off-by: Fugang Duan <fugang.duan@nxp.com>5.4-rM2-2.2.x-imx-squashed
parent
1dcfba998f
commit
ca906c76a1
|
@ -110,6 +110,10 @@ const void *of_get_mac_address(struct device_node *np)
|
|||
if (addr)
|
||||
return addr;
|
||||
|
||||
addr = of_get_mac_addr(np, "nvmem-mac-address");
|
||||
if (addr)
|
||||
return addr;
|
||||
|
||||
return of_get_mac_addr_nvmem(np);
|
||||
}
|
||||
EXPORT_SYMBOL(of_get_mac_address);
|
||||
|
|
Loading…
Reference in New Issue