diff mbox series

ARM: imx6: Fetch MAC address in board_init_late() on DH iMX6 PDK2

Message ID 20200514164910.1394647-1-marex@denx.de
State Accepted
Commit ba78c25afe96e4038849e9716e41261b9e114ab6
Headers show
Series ARM: imx6: Fetch MAC address in board_init_late() on DH iMX6 PDK2 | expand

Commit Message

Marek Vasut May 14, 2020, 4:49 p.m. UTC
This is needed to obtain the MAC from EEPROM/OTP only after the final
env is populated, otherwise the ethaddr might be overriden.

Signed-off-by: Marek Vasut <marex at denx.de>
Cc: Claudius Heine <ch at denx.de>
Cc: Harald Seiler <hws at denx.de>
Cc: Ludwig Zenz <lzenz at dh-electronics.com>
Cc: Stefano Babic <sbabic at denx.de>
---
 board/dhelectronics/dh_imx6/dh_imx6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/board/dhelectronics/dh_imx6/dh_imx6.c b/board/dhelectronics/dh_imx6/dh_imx6.c
index b6f8b11a10..8735d583bd 100644
--- a/board/dhelectronics/dh_imx6/dh_imx6.c
+++ b/board/dhelectronics/dh_imx6/dh_imx6.c
@@ -139,8 +139,6 @@  int board_init(void)
 	/* Enable eim_slow clocks */
 	setbits_le32(&mxc_ccm->CCGR6, 0x1 << MXC_CCM_CCGR6_EMI_SLOW_OFFSET);
 
-	setup_dhcom_mac_from_fuse();
-
 	setup_fec_clock();
 
 	return 0;
@@ -186,6 +184,8 @@  int board_late_init(void)
 	u32 hw_code;
 	char buf[16];
 
+	setup_dhcom_mac_from_fuse();
+
 	hw_code = board_get_hwcode();
 
 	switch (get_cpu_type()) {