• Michael Walle's avatar
    net: enetc: fetch MAC address from device tree · 652d3be2
    Michael Walle authored
    
    
    Normally, the bootloader will already initialize the MAC address
    registers of the ENETC and the driver will just use them or generate a
    random one, if it is not initialized.
    
    Add a new way to provide the MAC address: via device tree. Besides the
    usual 'mac-address' property, there is also the possibility to fetch it
    via a NVMEM provider. The sl28 board stores the MAC address in the SPI
    NOR flash OTP region. Having this will allow linux to fetch the MAC
    address from there without being dependent on the bootloader.
    
    No in-tree boards have the device tree properties set, thus for these,
    this is a no-op.
    Signed-off-by: default avatarMichael Walle <michael@walle.cc>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    652d3be2
enetc_pf.c 31.3 KB