net: eth-uclass: Support device tree MAC addresses
authorThierry Reding <treding@nvidia.com>
Mon, 20 May 2019 15:59:57 +0000 (17:59 +0200)
committerJoe Hershberger <joe.hershberger@ni.com>
Sat, 1 Jun 2019 18:33:17 +0000 (13:33 -0500)
commit379af67ab3ba1a16e032c8d082fe85efa4bf21fe
tree62006ee9d3174fa62d7125013e5cf1ddff789578
parentb743bbd2ebec440f42b44392b7dc4f79a9f588cf
net: eth-uclass: Support device tree MAC addresses

Add the standard Ethernet device tree bindings (imported from v5.0 of
the Linux kernel) and implement support for reading the MAC address for
Ethernet devices in the Ethernet uclass. If the "mac-address" property
exists, the MAC address will be parsed from that. If that property does
not exist, the "local-mac-address" property will be tried as fallback.

MAC addresses from device tree take precedence over the ones stored in
a network interface card's ROM.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Documentation/devicetree/bindings/net/ethernet.txt [new file with mode: 0644]
net/eth-uclass.c