diff options
author | Philippe Schenker <philippe.schenker@toradex.com> | 2022-06-15 14:07:47 +0200 |
---|---|---|
committer | Philippe Schenker <philippe.schenker@toradex.com> | 2022-06-20 17:20:44 +0200 |
commit | a9545589c0921a8b49316b7e2a21abe66d8dc4c8 (patch) | |
tree | 4a27092e5bac78205bfe61f6ebd9b3e80fa37bd3 /board/toradex/common/tdx-common.c | |
parent | 32957d21729fe2dc7ab12a42d751d1aa34c80618 (diff) |
toradex: tdx-cfg-block: add new toradex oui range
[ backported from https://lists.denx.de/pipermail/u-boot/2022-June/486993.html ]
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>
[ps: use kdiff3 to autoresolve conflicts]
Diffstat (limited to 'board/toradex/common/tdx-common.c')
-rw-r--r-- | board/toradex/common/tdx-common.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index e2f1090bd2..2eb4e845d2 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 @@ int show_board_info(void) 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), |