toradex: tdx-cfg-block: add new toradex oui range
Add new Toradex MAC OUI (8c:06:cb), to the config block. With this change
we extend the possible serial-numbers as follows:
For serial-numbers 00000000-16777215 OUI 00:14:2d is taken
For serial-numbers 16777216-33554431 OUI 8c:06:cb is taken
Lower 24-bit of the serial number are used in the NIC part of the
MAC address, the complete serial number can be calculated using the OUI.
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Reviewed-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
index 5ad5d00..3798bf9 100644
--- a/board/toradex/common/tdx-common.c
+++ b/board/toradex/common/tdx-common.c
@@ -20,8 +20,6 @@
#include <asm/setup.h>
#include "tdx-common.h"
-#define TORADEX_OUI 0x00142dUL
-
#define SERIAL_STR_LEN 8
#define MODULE_VER_STR_LEN 4 // V1.1
#define MODULE_REV_STR_LEN 3 // [A-Z] or #[26-99]
@@ -104,8 +102,7 @@
if (read_tdx_cfg_block()) {
printf("MISSING TORADEX CONFIG BLOCK\n");
- tdx_eth_addr.oui = htonl(TORADEX_OUI << 8);
- tdx_eth_addr.nic = htonl(tdx_serial << 8);
+ get_mac_from_serial(tdx_serial, &tdx_eth_addr);
checkboard();
} else {
snprintf(tdx_serial_str, sizeof(tdx_serial_str),