From: 黄涛 Date: Fri, 23 May 2014 07:16:41 +0000 (+0800) Subject: ARM: rockchip: add support bootloader charge X-Git-Tag: firefly_0821_release~5234 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=fa7b795ddfa25b051b5a4193d32e0ba190ce5b42;p=firefly-linux-kernel-4.4.55.git ARM: rockchip: add support bootloader charge --- diff --git a/arch/arm/mach-rockchip/common.c b/arch/arm/mach-rockchip/common.c index acd5ee725991..a41565adbacc 100755 --- a/arch/arm/mach-rockchip/common.c +++ b/arch/arm/mach-rockchip/common.c @@ -214,6 +214,7 @@ static inline const char *boot_flag_name(u32 flag) case BOOT_WIPEALL: return "WIPEALL"; case BOOT_CHECKIMG: return "CHECKIMG"; case BOOT_FASTBOOT: return "FASTBOOT"; + case BOOT_CHARGING: return "CHARGING"; default: return ""; } } @@ -253,8 +254,10 @@ void rockchip_restart_get_boot_mode(const char *cmd, u32 *flag, u32 *mode) *flag = SYS_LOADER_REBOOT_FLAG + BOOT_LOADER; else if(!strcmp(cmd, "recovery")) *flag = SYS_LOADER_REBOOT_FLAG + BOOT_RECOVER; - else if (!strcmp(cmd, "charge")) + else if (!strcmp(cmd, "charge")) { + *flag = SYS_LOADER_REBOOT_FLAG + BOOT_CHARGING; *mode = BOOT_MODE_CHARGE; + } } else { if (is_panic) *mode = BOOT_MODE_PANIC; diff --git a/arch/arm/mach-rockchip/loader.h b/arch/arm/mach-rockchip/loader.h index 9eaa790f710d..bf2cd47320e4 100644 --- a/arch/arm/mach-rockchip/loader.h +++ b/arch/arm/mach-rockchip/loader.h @@ -14,7 +14,9 @@ enum { BOOT_WIPEDATA, /* enter recover and wipe data. */ BOOT_WIPEALL, /* enter recover and wipe all data. */ BOOT_CHECKIMG, /* check firmware img with backup part(in loader mode)*/ - BOOT_FASTBOOT, /* enter fast boot mode (not support now) */ + BOOT_FASTBOOT, /* enter fast boot mode */ + BOOT_SECUREBOOT_DISABLE, + BOOT_CHARGING, /* enter charge mode */ BOOT_MAX /* MAX VALID BOOT TYPE.*/ };