reboot: add ffv_reboot mode [1/1]
authorHong Guo <hong.guo@amlogic.com>
Thu, 26 Sep 2019 05:45:58 +0000 (13:45 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Tue, 22 Oct 2019 08:48:08 +0000 (01:48 -0700)
PD#TV-10685

Problem:
add ffv_reboot mode

Solution:
add ffv_reboot mode

Verify:
test pass on tl1_x301

Change-Id: Ifdeb1819d89a54acbfebba0bcfe0865ea5c4ba5b
Signed-off-by: Hong Guo <hong.guo@amlogic.com>
drivers/amlogic/reboot/reboot.c
include/linux/amlogic/reboot.h

index c9b9f20..94b1153 100644 (file)
@@ -46,6 +46,8 @@ static u32 parse_reason(const char *cmd)
                if (strcmp(cmd, "recovery") == 0 ||
                                strcmp(cmd, "factory_reset") == 0)
                        reboot_reason = MESON_FACTORY_RESET_REBOOT;
+               else if (strcmp(cmd, "cold_boot") == 0)
+                       reboot_reason = MESON_COLD_REBOOT;
                else if (strcmp(cmd, "update") == 0)
                        reboot_reason = MESON_UPDATE_REBOOT;
                else if (strcmp(cmd, "fastboot") == 0)
@@ -66,6 +68,8 @@ static u32 parse_reason(const char *cmd)
                                strcmp(cmd, "quiescent,recovery") == 0 ||
                                strcmp(cmd, "quiescent,factory_reset") == 0)
                        reboot_reason = MESON_RECOVERY_QUIESCENT_REBOOT;
+               else if (strcmp(cmd, "ffv_reboot") == 0)
+                       reboot_reason = MESON_FFV_REBOOT;
        } else {
                if (kernel_panic) {
                        if (strcmp(kernel_panic, "kernel_panic") == 0) {
index bf50223..18a54a4 100644 (file)
@@ -29,3 +29,4 @@
 #define        MESON_CRASH_REBOOT                                      11
 #define        MESON_KERNEL_PANIC                                      12
 #define MESON_RECOVERY_QUIESCENT_REBOOT                                14
+#define MESON_FFV_REBOOT                                       15