[PATCH] board: freescale: fix LS1021a build
blemouzy.ml at gmail.com
blemouzy.ml at gmail.com
Mon Feb 17 16:36:03 CET 2025
From: Benjamin Lemouzy <blemouzy at 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 at 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
More information about the U-Boot
mailing list