[PATCH] xilinx: zynq: Guard code around SPL_FS_LOAD_PAYLOAD_NAME

Michal Simek michal.simek at amd.com
Fri Feb 7 07:43:23 CET 2025


Guard code around CONFIG_SPL_FS_LOAD_PAYLOAD_NAME usage to avoid
compilation failure.

Signed-off-by: Michal Simek <michal.simek at amd.com>
---

 board/xilinx/zynq/board.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
index a852d5b8ed53..8dbfa5604231 100644
--- a/board/xilinx/zynq/board.c
+++ b/board/xilinx/zynq/board.c
@@ -179,6 +179,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
 	memset(buf, 0, sizeof(buf));
 
 	switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
+#if defined(CONFIG_SPL_FS_LOAD_PAYLOAD_NAME)
 	case ZYNQ_BM_SD:
 		snprintf(buf, DFU_ALT_BUF_LEN,
 			 "mmc 0=boot.bin fat 0 1;"
@@ -192,6 +193,7 @@ void set_dfu_alt_info(char *interface, char *devstr)
 			 CONFIG_SPL_FS_LOAD_PAYLOAD_NAME,
 			 CONFIG_SYS_SPI_U_BOOT_OFFS);
 		break;
+#endif
 #endif
 	default:
 		return;
-- 
2.43.0



More information about the U-Boot mailing list