Re: [PATCH 1/4] board: dhelectronics: Implement common mac address functions

2022-07-20 Thread Marek Vasut
On 7/4/22 13:11, Philip Oberfichtner wrote: [...] +++ b/board/dhelectronics/common/dh_common.c @@ -0,0 +1,64 @@ [...] +int dh_get_mac_from_eeprom(unsigned char *enetaddr, const char *alias) +{ + struct udevice *dev; + int ret, offset; + + offset = fdt_path_offset(gd->fdt_b

[PATCH 1/4] board: dhelectronics: Implement common mac address functions

2022-07-04 Thread Philip Oberfichtner
This is a starting point for unifying duplicate code in the DH board files. The functions for setting up the mac address 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