[PATCH 3/4] xilinx: zynqmp: Move dfu.h include to be with the code

Tom Rini trini at konsulko.com
Thu Aug 17 19:41:24 CEST 2023

Move where we include <dfu.h> to be guarded by a DFU-related Kconfig

Signed-off-by: Tom Rini <trini at konsulko.com>
This becomes an issue with
applied as now we can't include <dfu.h> without CONFIG_DFU_NAME_MAX_SIZE
set (or we have a dummy value for ifndef).  Another option would be to
restructure the code to move the dfu code to another file, but I don't
know if that will make the rest of the real use cases here easier or

Cc: Michal Simek <michal.simek at amd.com>
 board/xilinx/zynqmp/zynqmp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 309f24a5f43d..367c3c65a9dc 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -8,7 +8,6 @@
 #include <command.h>
 #include <cpu_func.h>
 #include <debug_uart.h>
-#include <dfu.h>
 #include <env.h>
 #include <env_internal.h>
 #include <init.h>
@@ -606,6 +605,7 @@ enum env_location env_get_location(enum env_operation op, int prio)
+#include <dfu.h>
 #define DFU_ALT_BUF_LEN		SZ_1K

More information about the U-Boot mailing list