summaryrefslogtreecommitdiff
path: root/recipes-bsp/u-boot/u-boot/0010-toradex-common-Remove-ifdef-usage-for-2nd-ethaddr.patch
diff options
context:
space:
mode:
authorFrancesco Dolcini <francesco.dolcini@toradex.com>2022-07-27 09:48:38 +0200
committerFrancesco Dolcini <francesco.dolcini@toradex.com>2022-08-03 11:26:39 +0000
commit2636f877f2c136dec023cd85c4ae2c7c7c45eb90 (patch)
tree024571d1e397d97d8f7ee6a9266ed7f281e6b969 /recipes-bsp/u-boot/u-boot/0010-toradex-common-Remove-ifdef-usage-for-2nd-ethaddr.patch
parent81dba8716539bf1bdb30e9591febef2d25caf2f0 (diff)
u-boot: Update patches adding config block refactoring
Update U-Boot v2022.07 patches, backport `board/toradex` patches from current denx/master git. This updates the config block interactive creation procedure. Related-to: ELB-4626 Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Diffstat (limited to 'recipes-bsp/u-boot/u-boot/0010-toradex-common-Remove-ifdef-usage-for-2nd-ethaddr.patch')
-rw-r--r--recipes-bsp/u-boot/u-boot/0010-toradex-common-Remove-ifdef-usage-for-2nd-ethaddr.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot/0010-toradex-common-Remove-ifdef-usage-for-2nd-ethaddr.patch b/recipes-bsp/u-boot/u-boot/0010-toradex-common-Remove-ifdef-usage-for-2nd-ethaddr.patch
new file mode 100644
index 0000000..af02b2b
--- /dev/null
+++ b/recipes-bsp/u-boot/u-boot/0010-toradex-common-Remove-ifdef-usage-for-2nd-ethaddr.patch
@@ -0,0 +1,40 @@
+From 9762fbeea451f4d81ec88788e7680e37a1ee5beb Mon Sep 17 00:00:00 2001
+From: Francesco Dolcini <francesco.dolcini@toradex.com>
+Date: Thu, 21 Jul 2022 15:17:36 +0200
+Subject: [PATCH 10/12] toradex: common: Remove #ifdef usage for 2nd ethaddr
+
+Fix checkpatch warn, use `IS_ENABLED(CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR)`
+instead of `#ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR`.
+
+Upstream-Status: Backport [9762fbeea451f4d81ec88788e7680e37a1ee5beb]
+Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
+---
+ board/toradex/common/tdx-common.c | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c
+index 3643ebbb1632..2284fcddb510 100644
+--- a/board/toradex/common/tdx-common.c
++++ b/board/toradex/common/tdx-common.c
+@@ -151,8 +151,8 @@ int show_board_info(void)
+ if (!eth_env_get_enetaddr("ethaddr", ethaddr))
+ eth_env_set_enetaddr("ethaddr", (u8 *)&tdx_eth_addr);
+
+-#ifdef CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR
+- if (!eth_env_get_enetaddr("eth1addr", ethaddr)) {
++ if (IS_ENABLED(CONFIG_TDX_CFG_BLOCK_2ND_ETHADDR) &&
++ !eth_env_get_enetaddr("eth1addr", ethaddr)) {
+ /*
+ * Secondary MAC address is allocated from block
+ * 0x100000 higher then the first MAC address
+@@ -161,7 +161,6 @@ int show_board_info(void)
+ ethaddr[3] += 0x10;
+ eth_env_set_enetaddr("eth1addr", ethaddr);
+ }
+-#endif
+
+ return 0;
+ }
+--
+2.25.1
+