1
0
Fork 0

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
Fugang Duan 2019-05-10 15:12:39 +08:00 committed by Dong Aisheng
parent 1dcfba998f
commit ca906c76a1
1 changed files with 4 additions and 0 deletions

View File

@ -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);