[PATCH v1 1/4] board: apalis-imx8: add reset code

max.oss.09 at gmail.com max.oss.09 at gmail.com
Wed Aug 7 16:16:17 CEST 2024


From: Andrejs Cainikovs <andrejs.cainikovs at toradex.com>

With commit 922d4504bcab ("imx: scu_api: update to version 1.16 and
add more APIs") added the reboot API.

Add the board code to use that.

Signed-off-by: Andrejs Cainikovs <andrejs.cainikovs at toradex.com>
Signed-off-by: Max Krummenacher <max.krummenacher at toradex.com>
---

 board/toradex/apalis-imx8/apalis-imx8.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/board/toradex/apalis-imx8/apalis-imx8.c b/board/toradex/apalis-imx8/apalis-imx8.c
index 72d67d90d418..570bf2a27d4b 100644
--- a/board/toradex/apalis-imx8/apalis-imx8.c
+++ b/board/toradex/apalis-imx8/apalis-imx8.c
@@ -290,6 +290,14 @@ int board_init(void)
 	return 0;
 }
 
+void reset_cpu(void)
+{
+	sc_pm_reboot(-1, SC_PM_RESET_TYPE_COLD);
+
+	do {
+	} while (1);
+}
+
 #if defined(CONFIG_OF_LIBFDT) && defined(CONFIG_OF_BOARD_SETUP)
 int ft_board_setup(void *blob, struct bd_info *bd)
 {
-- 
2.42.0



More information about the U-Boot mailing list