]> git.baikalelectronics.ru Git - uboot.git/commit
rockchip: rk3399: derive ethaddr from cpuid
authorRohan Garg <rohan.garg@collabora.com>
Mon, 12 Aug 2019 15:04:34 +0000 (17:04 +0200)
committerKever Yang <kever.yang@rock-chips.com>
Fri, 23 Aug 2019 10:15:31 +0000 (18:15 +0800)
commitbf21c263294a742b788d125452fe5cd4ecfdbdf6
treecb74d5404bffc277920dc2e4976a8261a7578648
parent1c5fc3319f90550e978ffbc6888000b8e0817ad0
rockchip: rk3399: derive ethaddr from cpuid

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 <rohan.garg@collabora.com>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
arch/arm/include/asm/arch-rockchip/misc.h [new file with mode: 0644]
arch/arm/mach-rockchip/Makefile
arch/arm/mach-rockchip/board.c
arch/arm/mach-rockchip/misc.c [new file with mode: 0644]