[PATCH RFC next 1/5] ls1028a: only include drivers/net/fsl_enetc.h when driver is compiled

Quentin Schulz foss+uboot at 0leil.net
Wed Apr 29 12:35:01 CEST 2026


From: Quentin Schulz <quentin.schulz at cherry.de>

As hinted by its path, it's not really meant to be included outside of
the driver itself. This header uses CONFIG_SYS_RX_ETH_BUFFER which we
are trying to move under CONFIG_NET dependency. This file here can be
compiled without network support so make sure this only gets included
when needed.

The function from that header (fdt_fixup_enetc_mac) is already guarded
by CONFIG_FSL_ENETC so simply guard the inclusion of the header the same
way.

This was tested by building ls1028aqds_tfa_defconfig with
CONFIG_MSCC_FELIX_SWITCH and CONFIG_FSL_ENETC disabled.

Signed-off-by: Quentin Schulz <quentin.schulz at cherry.de>
---
 board/nxp/ls1028a/ls1028a.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/nxp/ls1028a/ls1028a.c b/board/nxp/ls1028a/ls1028a.c
index db94d9c1fa8..4725efd1002 100644
--- a/board/nxp/ls1028a/ls1028a.c
+++ b/board/nxp/ls1028a/ls1028a.c
@@ -26,7 +26,9 @@
 #include <fdtdec.h>
 #include <miiphy.h>
 #include "../common/qixis.h"
+#ifdef CONFIG_FSL_ENETC
 #include "../drivers/net/fsl_enetc.h"
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 

-- 
2.54.0



More information about the U-Boot mailing list