diff mbox series

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

Message ID 20230310134333.98573-2-andreas.aegerter@mt.com
State Changes Requested
Delegated to: Stefano Babic
Headers show
Series colibri_imx6: fix linker issue when enabling watchdog | expand

Commit Message

Aegerter Andreas LCPF-CH March 10, 2023, 1:43 p.m. UTC
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@mt.com>
---
 board/toradex/colibri_imx6/colibri_imx6.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

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,