]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
board: apalis-imx8: add reset code
authorAndrejs Cainikovs <andrejs.cainikovs@toradex.com>
Wed, 7 Aug 2024 14:16:17 +0000 (16:16 +0200)
committerFabio Estevam <festevam@gmail.com>
Fri, 23 Aug 2024 17:48:43 +0000 (14:48 -0300)
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@toradex.com>
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
board/toradex/apalis-imx8/apalis-imx8.c

index 72d67d90d418306d605c05735a97dbcf25f01d4f..570bf2a27d4be75e7e17eb086aa51a94a9646bde 100644 (file)
@@ -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)
 {