]> git.baikalelectronics.ru Git - uboot.git/commit
board: dhelectronics: Implement common MAC address functions
authorPhilip Oberfichtner <pro@denx.de>
Tue, 26 Jul 2022 13:04:50 +0000 (15:04 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 12 Aug 2022 20:10:49 +0000 (16:10 -0400)
commit1a9eadc6a14622afe35e9b0e8fc9478ae5c026de
tree8b75955275b042bf37f5f4e7c475e0cc832f6409
parentbb77207ddab2a9e545d7a47416e2151c50ec7542
board: dhelectronics: Implement common MAC address functions

This is a starting point for unifying duplicate code in the DH board
files. The functions for setting up MAC addresses are very similar for
the i.MX6, i.MX8 and stm32mp1 based boards.

All pre-existing implementations follow the same logic:

(1) Check if ethaddr is already set in the environment
(2) If not, try to get it from a board specific location (e.g. fuse)
(3) If not, try to get it from eeprom

After this commit, (1) and (3) are implemented as common functions,
ready to be used by board specific files.

Furthermore there is an implementation of (2) for imx based boards.

Signed-off-by: Philip Oberfichtner <pro@denx.de>
Reviewed-by: Marek Vasut <marex@denx.de>
board/dhelectronics/common/Makefile [new file with mode: 0644]
board/dhelectronics/common/dh_common.c [new file with mode: 0644]
board/dhelectronics/common/dh_common.h [new file with mode: 0644]
board/dhelectronics/common/dh_imx.c [new file with mode: 0644]
board/dhelectronics/common/dh_imx.h [new file with mode: 0644]