• Petr Štetiar's avatar
    of_net: add NVMEM support to of_get_mac_address · d01f449c
    Petr Štetiar authored
    Many embedded devices have information such as MAC addresses stored
    inside NVMEMs like EEPROMs and so on. Currently there are only two
    drivers in the tree which benefit from NVMEM bindings.
    
    Adding support for NVMEM into every other driver would mean adding a lot
    of repetitive code. This patch allows us to configure MAC addresses in
    various devices like ethernet and wireless adapters directly from
    of_get_mac_address, which is already used by almost every driver in the
    tree.
    
    Predecessor of this patch which used directly MTD layer has originated
    in OpenWrt some time ago and supports already about 497 use cases in 357
    device tree files.
    
    Cc: Alban Bedel <albeu@free.fr>
    Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
    Signed-off-by: default avatarJohn Crispin <john@phrozen.org>
    Signed-off-by: default avatarPetr Štetiar <ynezz@true.cz>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d01f449c
of_net.c 3.42 KB