summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/toradex/common/configblock.c11
-rw-r--r--include/configs/colibri_vf.h1
2 files changed, 12 insertions, 0 deletions
diff --git a/board/toradex/common/configblock.c b/board/toradex/common/configblock.c
index bd76b845a8..825cb0c10f 100644
--- a/board/toradex/common/configblock.c
+++ b/board/toradex/common/configblock.c
@@ -163,6 +163,17 @@ int read_trdx_cfg_block(void)
if (!eth_getenv_enetaddr("ethaddr", ethaddr))
eth_setenv_enetaddr("ethaddr", cfg_block_ethaddr);
+#ifdef CONFIG_TRDX_CFG_BLOCK_2ND_ETHADDR
+ if (!eth_getenv_enetaddr("eth1addr", ethaddr)) {
+ /*
+ * Secondary MAC address is allocated from a block
+ * 0x100000 higher then the first MAC address
+ */
+ cfg_block_ethaddr[3] += 0x10;
+ eth_setenv_enetaddr("eth1addr", cfg_block_ethaddr);
+ }
+#endif
+
return 0;
}
#endif /* CONFIG_TRDX_CFG_BLOCK */
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index 87aa617a57..76564acc4e 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -115,6 +115,7 @@
#define CONFIG_TRDX_CFG_BLOCK_IS_IN_NAND
#define CONFIG_TRDX_CFG_BLOCK_OFFSET 0x800
#define CONFIG_TRDX_CFG_BLOCK_SIZE 2048
+#define CONFIG_TRDX_CFG_BLOCK_2ND_ETHADDR
#define CONFIG_REVISION_TAG
#define CONFIG_SERIAL_TAG