[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
option.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
This becomes an issue with
https://patchwork.ozlabs.org/project/uboot/patch/20220620111354.448512-1-jh80.chung@samsung.com/
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
harder.

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)
 }
 
 #if defined(CONFIG_SET_DFU_ALT_INFO)
+#include <dfu.h>
 
 #define DFU_ALT_BUF_LEN		SZ_1K
 
-- 
2.34.1



More information about the U-Boot mailing list