]> git.baikalelectronics.ru Git - uboot.git/commit
rockchip: board: puma_rk3399: derive ethaddr from cpuid
authorKlaus Goger <klaus.goger@theobroma-systems.com>
Fri, 5 May 2017 17:21:40 +0000 (19:21 +0200)
committerSimon Glass <sjg@chromium.org>
Wed, 7 Jun 2017 13:29:18 +0000 (07:29 -0600)
commitf1fbea209234ee9238cc15da22d9b3d152665085
treecc91fba6245a3216cd7df720822214334afd5645
parent4ec1bce197fab1636466817b5510221a7de833ba
rockchip: board: puma_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.

Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com>
Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
board/theobroma-systems/puma_rk3399/puma-rk3399.c