diff options
Diffstat (limited to 'power/qcom.c')
-rw-r--r-- | power/qcom.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/power/qcom.c b/power/qcom.c index ef9e329111..a119ce23d6 100644 --- a/power/qcom.c +++ b/power/qcom.c @@ -578,13 +578,19 @@ enum power_state power_chipset_init(void) } } - /* Leave power off only if requested by reset flags */ - if (!(reset_flags & EC_RESET_FLAG_AP_OFF) && - !(reset_flags & EC_RESET_FLAG_SYSJUMP)) { - CPRINTS("auto_power_on set due to reset_flag 0x%x", - system_get_reset_flags()); - auto_power_on = 1; - } + auto_power_on = 1; + + /* + * Leave power off only if requested by reset flags + * + * TODO(b/201099749): EC bootloader: Give RO chance to run EFS after + * shutdown from recovery screen + */ + if (reset_flags & EC_RESET_FLAG_AP_OFF) + auto_power_on = 0; + else if (!(reset_flags & EC_RESET_FLAG_EFS) && + (reset_flags & EC_RESET_FLAG_SYSJUMP)) + auto_power_on = 0; if (battery_is_present() == BP_YES) { /* @@ -595,6 +601,9 @@ enum power_state power_chipset_init(void) battery_wait_for_stable(); } + if (auto_power_on) + CPRINTS("auto_power_on set due to reset flags"); + return init_power_state; } @@ -803,7 +812,7 @@ void chipset_force_shutdown(enum chipset_shutdown_reason reason) task_wake(TASK_ID_CHIPSET); } -void chipset_reset(enum chipset_reset_reason reason) +void chipset_reset(enum chipset_shutdown_reason reason) { int rv; |