diff options
author | Hu, Hebo <hebo.hu@intel.com> | 2019-05-07 16:42:03 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-05-09 16:05:40 -0700 |
commit | 6513dabd100d20a0c15ab65c126d865159672568 (patch) | |
tree | c5f30e39530a9b61d90f2a2d9d2a1cf84b9bdb49 | |
parent | 962662c31592cec308264dcaa4c88288e72a9fdc (diff) | |
download | chrome-ec-6513dabd100d20a0c15ab65c126d865159672568.tar.gz |
ish/ish5: remove watchdog disable during D0ix
ECOS will reload watchdog in hook task for every HOOK_TICK_INTERVAL
time, and this will make HPET timer 1 wakeup ish. Therefore, we do not
need to disable watchdog during D0ix.
D3 and reset prep flow still need disable watchdog.
BUG=b:132112137
BRANCH=none
TEST='waitms 10500' console command can trigger watchdog timeout and
ish reboot
Change-Id: I11aad5ece0ce96bc53738512290c1e42bf175479
Signed-off-by: Hu, Hebo <hebo.hu@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/1598713
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Hebo Hu <hebo.hu@intel.corp-partner.google.com>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
-rw-r--r-- | chip/ish/aontaskfw/ish_aontask.c | 3 | ||||
-rw-r--r-- | chip/ish/power_mgt.c | 16 | ||||
-rw-r--r-- | chip/ish/watchdog.c | 10 |
3 files changed, 3 insertions, 26 deletions
diff --git a/chip/ish/aontaskfw/ish_aontask.c b/chip/ish/aontaskfw/ish_aontask.c index 187d073671..95b6d9ce5d 100644 --- a/chip/ish/aontaskfw/ish_aontask.c +++ b/chip/ish/aontaskfw/ish_aontask.c @@ -543,6 +543,9 @@ static void handle_d3(void) static void handle_reset(int pm_state) { + /* disable watch dog */ + WDT_CONTROL &= ~WDT_CONTROL_ENABLE_BIT; + /* disable CSME CSR irq */ IPC_PIMR &= ~IPC_PIMR_CSME_CSR_BIT; diff --git a/chip/ish/power_mgt.c b/chip/ish/power_mgt.c index 663bae61af..12645ab6b9 100644 --- a/chip/ish/power_mgt.c +++ b/chip/ish/power_mgt.c @@ -11,7 +11,6 @@ #include "interrupts.h" #include "aontaskfw/ish_aon_share.h" #include "power_mgt.h" -#include "watchdog.h" #include "ish_dma.h" #ifdef CONFIG_ISH_PM_DEBUG @@ -24,11 +23,6 @@ #define CPRINTF(format, args...) #endif -#ifdef CONFIG_WATCHDOG -extern void watchdog_enable(void); -extern void watchdog_disable(void); -#endif - /* defined in link script: core/minute-ia/ec.lds.S */ extern uint32_t __aon_ro_start; extern uint32_t __aon_ro_end; @@ -468,10 +462,6 @@ static void pm_process(timestamp_t cur_time, uint32_t idle_us) decide = d0ix_decide(cur_time, idle_us); -#ifdef CONFIG_WATCHDOG - watchdog_disable(); -#endif - switch (decide) { #ifdef CONFIG_ISH_PM_D0I1 case ISH_PM_STATE_D0I1: @@ -497,12 +487,6 @@ static void pm_process(timestamp_t cur_time, uint32_t idle_us) if (decide == ISH_PM_STATE_D0I2 || decide == ISH_PM_STATE_D0I3) check_aon_task_status(); #endif - -#ifdef CONFIG_WATCHDOG - watchdog_enable(); - watchdog_reload(); -#endif - } void ish_pm_init(void) diff --git a/chip/ish/watchdog.c b/chip/ish/watchdog.c index d9a9d84008..fd0ebcf247 100644 --- a/chip/ish/watchdog.c +++ b/chip/ish/watchdog.c @@ -46,16 +46,6 @@ int watchdog_init(void) return EC_SUCCESS; } -void watchdog_enable(void) -{ - WDT_CONTROL |= WDT_CONTROL_ENABLE_BIT; -} - -void watchdog_disable(void) -{ - WDT_CONTROL &= ~WDT_CONTROL_ENABLE_BIT; -} - /* Parameters are pushed by hardware, we only care about %EIP */ __attribute__ ((noreturn)) void watchdog_warning(uint32_t errorcode, |