From: Klaus Goger <klaus.go...@theobroma-systems.com>

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.

Signed-off-by: Klaus Goger <klaus.go...@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.toms...@theobroma-systems.com>

Reviewed-by: Simon Glass <s...@chromium.org>

---

Changes in v3:
- uses uclass_get_device_by_driver() to ensure we don't pick up the wrong
  misc-device

Changes in v2:
- added derivation of ethaddr from cpuid

 board/theobroma-systems/puma_rk3399/puma-rk3399.c | 43 +++++++++++++++++++++--
 1 file changed, 41 insertions(+), 2 deletions(-)

Applied to u-boot-rockchip, thanks!
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to