[PATCH 3/9] ARM: zynq: zed: guard board initcall
Lucas Stach
dev at lynxeye.de
Fri Dec 13 13:00:09 PST 2024
Make sure the board initcall is only executed on a
compatible board.
Signed-off-by: Lucas Stach <dev at lynxeye.de>
---
arch/arm/boards/avnet-zedboard/board.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/boards/avnet-zedboard/board.c b/arch/arm/boards/avnet-zedboard/board.c
index 15332189ca09..faa0bacf0ce1 100644
--- a/arch/arm/boards/avnet-zedboard/board.c
+++ b/arch/arm/boards/avnet-zedboard/board.c
@@ -12,6 +12,9 @@
static int zedboard_console_init(void)
{
+ if (!of_machine_is_compatible("avnet,zynq-zed"))
+ return 0;
+
barebox_set_hostname("zedboard");
return 0;
--
2.47.1
More information about the barebox
mailing list