autoboot.c: Disable watchdog when autoboot aborted
authorDongil Park <dongil01.park@samsung.com>
Fri, 24 Aug 2018 05:46:44 +0000 (14:46 +0900)
committerDongil Park <dongil01.park@samsung.com>
Fri, 24 Aug 2018 06:12:52 +0000 (15:12 +0900)
This patch disable watchdog when autoboot aborted by user.

Change-Id: I76699c9ca22123a49ebd3e9d5239301252bd53b9
Signed-off-by: Dongil Park <dongil01.park@samsung.com>
common/autoboot.c

index c11fb3123615b5834837854dd60ce2c1c32b206c..31a3ed62f17a74745fa5466d4e22cd9f693bbc18 100644 (file)
@@ -14,6 +14,9 @@
 #include <menu.h>
 #include <post.h>
 #include <u-boot/sha256.h>
+#if defined(CONFIG_S5P6818_WATCHDOG)
+#include <watchdog.h>
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -369,6 +372,12 @@ void autoboot_command(const char *s)
                disable_ctrlc(prev);    /* restore Control C checking */
 #endif
        }
+#if defined(CONFIG_S5P6818_WATCHDOG)
+       else {
+               /* We should stop watchdog in case of abort */
+               watchdog_reset();
+       }
+#endif
 
 #ifdef CONFIG_MENUKEY
        if (menukey == CONFIG_MENUKEY) {