reboot: reason: add reboot_reason quiescent [1/4]
authorXindong Xu <xindong.xu@amlogic.com>
Tue, 16 Oct 2018 06:41:30 +0000 (14:41 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Tue, 20 Nov 2018 01:49:55 +0000 (17:49 -0800)
PD#SWPL-1887

Problem:
Android TV need reboot_reason quiescent

Solution:
add reboot_reason quiescent

Verify:
ampere

Change-Id: Ie5a748faae05be93c56722b7806df6179116a047
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
drivers/amlogic/reboot/reboot.c
include/linux/amlogic/reboot.h

index 4a1cc9b..6e5cd09 100644 (file)
@@ -61,6 +61,14 @@ static u32 parse_reason(const char *cmd)
                        reboot_reason = MESON_CRASH_REBOOT;
                else if (strcmp(cmd, "uboot_suspend") == 0)
                        reboot_reason = MESON_UBOOT_SUSPEND;
+               else if (strcmp(cmd, "quiescent") == 0 ||
+                               strcmp(cmd, ",quiescent") == 0)
+                       reboot_reason = MESON_QUIESCENT_REBOOT;
+               else if (strcmp(cmd, "recovery,quiescent") == 0 ||
+                               strcmp(cmd, "factory_reset,quiescent") == 0 ||
+                               strcmp(cmd, "quiescent,recovery") == 0 ||
+                               strcmp(cmd, "quiescent,factory_reset") == 0)
+                       reboot_reason = MESON_RECOVERY_QUIESCENT_REBOOT;
        } else {
                if (kernel_panic) {
                        if (strcmp(kernel_panic, "kernel_panic") == 0) {
index de8c690..bf50223 100644 (file)
@@ -25,5 +25,7 @@
 #define        MESON_HIBERNATE                                         6
 #define        MESON_BOOTLOADER_REBOOT                         7
 #define        MESON_RPMBP_REBOOT                                      9
+#define MESON_QUIESCENT_REBOOT                                 10
 #define        MESON_CRASH_REBOOT                                      11
 #define        MESON_KERNEL_PANIC                                      12
+#define MESON_RECOVERY_QUIESCENT_REBOOT                                14