diff options
Diffstat (limited to 'common/gaia_power.c')
-rw-r--r-- | common/gaia_power.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/common/gaia_power.c b/common/gaia_power.c index 1b3cc61a2a..441f46f634 100644 --- a/common/gaia_power.c +++ b/common/gaia_power.c @@ -437,6 +437,8 @@ static int react_to_xpshold(unsigned int timeout_us) */ static void power_off(void) { + int pmu_shutdown_retries = 3; + /* Call hooks before we drop power rails */ hook_notify(HOOK_CHIPSET_SHUTDOWN, 0); /* switch off all rails */ @@ -449,7 +451,12 @@ static void power_off(void) lid_changed = 0; enable_sleep(SLEEP_MASK_AP_RUN); powerled_set_state(POWERLED_STATE_OFF); - if (pmu_shutdown()) + + while (--pmu_shutdown_retries >= 0) { + if (!pmu_shutdown()) + break; + } + if (pmu_shutdown_retries < 0) board_hard_reset(); CPUTS("Shutdown complete.\n"); } |