[PATCH v1 1/2] colibri_imx6: fix linker issue enabling watchdog

Andreas Aegerter andreas.aegerter at mt.com
Fri Mar 10 14:43:32 CET 2023


Using colibri_imx6_defconfig with additionally CONFIG_WATCHDOG, CONFIG_WDT and
CONFIG_IMX_WATCHDOG enabled results in a linker error.

arm-linux-gnueabihf-ld.bfd: arch/arm/lib/reset.o: in function `do_reset':
/home/aegerter-1/u-boot/arch/arm/lib/reset.c:42: undefined reference to `reset_cpu'

Define reset_cpu() also outside of SPL.

Signed-off-by: Andreas Aegerter <andreas.aegerter at mt.com>
---
 board/toradex/colibri_imx6/colibri_imx6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c
index 65e0e9a156..dcae1c7280 100644
--- a/board/toradex/colibri_imx6/colibri_imx6.c
+++ b/board/toradex/colibri_imx6/colibri_imx6.c
@@ -1116,12 +1116,12 @@ int board_fit_config_name_match(const char *name)
 }
 #endif
 
+#endif /* CONFIG_SPL_BUILD */
+
 void reset_cpu(void)
 {
 }
 
-#endif /* CONFIG_SPL_BUILD */
-
 static struct mxc_serial_plat mxc_serial_plat = {
 	.reg = (struct mxc_uart *)UART1_BASE,
 	.use_dte = true,
-- 
2.39.2



More information about the U-Boot mailing list