1 From: Tobias Schramm <tobias@t-sys.eu>
2 Subject: mvpp2: support fetching mac address from nvmem
4 The mvpp2 driver did not query nvmem for hardware mac addresses. This
5 patch adds querying of mac addresses stored in nvmem cells as a further
6 fallback option before assigning a random address.
7 Purposely added separately to fwnode_get_mac_address() above to maintain
8 existing behaviour with builtin adapter mac address still taking
11 Signed-off-by: Tobias Schramm <tobias@t-sys.eu>
13 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
14 +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
15 @@ -6134,6 +6134,12 @@ static void mvpp2_port_copy_mac_addr(str
19 + if (!of_get_mac_address(to_of_node(fwnode), hw_mac_addr)) {
20 + *mac_from = "nvmem cell";
21 + eth_hw_addr_set(dev, hw_mac_addr);
26 eth_hw_addr_random(dev);