]> git.sur5r.net Git - u-boot/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)
commit8adc9d18a8344cba01bcaa13318ca8cf1afac312
treecc91fba6245a3216cd7df720822214334afd5645
parent9415b9a7d85c6c77698a551c47765720c2caef91
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