All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] board: freescale: fix LS1021a build
@ 2025-02-17 15:36 blemouzy.ml
  2025-02-28  4:10 ` Peng Fan
  0 siblings, 1 reply; 3+ messages in thread
From: blemouzy.ml @ 2025-02-17 15:36 UTC (permalink / raw)
  To: u-boot; +Cc: alison.wang, sjg, trini, olteanv, Benjamin Lemouzy

From: Benjamin Lemouzy <blemouzy@centralp.fr>

Fix build error "undefined reference to `is_warm_boot'" when
ls1021atsn and ls1021atwr boards are built with CONFIG_SPL=y and
CONFIG_DEEP_SLEEP=n.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
---
 board/freescale/ls1021atsn/ls1021atsn.c | 4 ++++
 board/freescale/ls1021atwr/ls1021atwr.c | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/board/freescale/ls1021atsn/ls1021atsn.c b/board/freescale/ls1021atsn/ls1021atsn.c
index d1acccec11..6d64df7cc4 100644
--- a/board/freescale/ls1021atsn/ls1021atsn.c
+++ b/board/freescale/ls1021atsn/ls1021atsn.c
@@ -159,7 +159,9 @@ int board_early_init_f(void)
 #ifdef CONFIG_XPL_BUILD
 void board_init_f(ulong dummy)
 {
+#if defined(CONFIG_DEEP_SLEEP)
 	void (*second_uboot)(void);
+#endif
 
 	/* Clear the BSS */
 	memset(__bss_start, 0, __bss_end - __bss_start);
@@ -181,6 +183,7 @@ void board_init_f(ulong dummy)
 	enable_layerscape_ns_access();
 #endif
 
+#if defined(CONFIG_DEEP_SLEEP)
 	/*
 	 * if it is woken up from deep sleep, then jump to second
 	 * stage U-Boot and continue executing without recopying
@@ -191,6 +194,7 @@ void board_init_f(ulong dummy)
 		second_uboot = (void (*)(void))CONFIG_TEXT_BASE;
 		second_uboot();
 	}
+#endif
 
 	board_init_r(NULL, 0);
 }
diff --git a/board/freescale/ls1021atwr/ls1021atwr.c b/board/freescale/ls1021atwr/ls1021atwr.c
index cc9665c041..937e766069 100644
--- a/board/freescale/ls1021atwr/ls1021atwr.c
+++ b/board/freescale/ls1021atwr/ls1021atwr.c
@@ -410,7 +410,9 @@ int board_early_init_f(void)
 #ifdef CONFIG_XPL_BUILD
 void board_init_f(ulong dummy)
 {
+#if defined(CONFIG_DEEP_SLEEP)
 	void (*second_uboot)(void);
+#endif
 
 	/* Clear the BSS */
 	memset(__bss_start, 0, __bss_end - __bss_start);
@@ -432,6 +434,7 @@ void board_init_f(ulong dummy)
 	enable_layerscape_ns_access();
 #endif
 
+#if defined(CONFIG_DEEP_SLEEP)
 	/*
 	 * if it is woken up from deep sleep, then jump to second
 	 * stage uboot and continue executing without recopying
@@ -442,6 +445,7 @@ void board_init_f(ulong dummy)
 		second_uboot = (void (*)(void))CONFIG_TEXT_BASE;
 		second_uboot();
 	}
+#endif
 
 	board_init_r(NULL, 0);
 }
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-28  8:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-17 15:36 [PATCH] board: freescale: fix LS1021a build blemouzy.ml
2025-02-28  4:10 ` Peng Fan
2025-02-28  8:16   ` Benjamin Lemouzy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.