diff options
Diffstat (limited to 'chip/it83xx/system.c')
-rw-r--r-- | chip/it83xx/system.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chip/it83xx/system.c b/chip/it83xx/system.c index 77e8c75746..a42134e0d4 100644 --- a/chip/it83xx/system.c +++ b/chip/it83xx/system.c @@ -72,6 +72,13 @@ static void check_reset_cause(void) chip_save_reset_flags(0); system_set_reset_flags(flags); + + /* Clear PD contract recorded in bram if this is a power-on reset. */ + if (IS_ENABLED(CONFIG_IT83XX_RESET_PD_CONTRACT_IN_BRAM) && + (flags == (EC_RESET_FLAG_POWER_ON | EC_RESET_FLAG_RESET_PIN))) { + for (int i = 0; i < MAX_SYSTEM_BBRAM_IDX_PD_PORTS; i++) + system_set_bbram((SYSTEM_BBRAM_IDX_PD0 + i), 0); + } } static void system_reset_cause_is_unknown(void) |