• Rohan Garg's avatar
    rockchip: derive ethaddr from cpuid · 237a44d2
    Rohan Garg authored
    
    
    Generate a MAC address based on the cpuid available in the efuse
    block: Use the first 6 byte of the cpuid's SHA256 hash and set the
    locally administered bits. Also ensure that the multicast bit is
    cleared.
    
    The MAC address is only generated and set if there is no ethaddr
    present in the saved environment.
    
    This is based off of Klaus Goger's work in 8adc9d
    Signed-off-by: Rohan Garg's avatarRohan Garg <rohan.garg@collabora.com>
    
    Series-cc: Klaus Goger <klaus.goger@theobroma-systems.com>
    Series-cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
    237a44d2
evb-rk3399.c 2.92 KB