From 397ccbb553fb1aac67fb1f0ff8154550de936c5c Mon Sep 17 00:00:00 2001 From: "Hu, Hebo" Date: Tue, 7 May 2019 16:42:03 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1598713 Commit-Ready: ChromeOS CL Exonerator Bot Tested-by: Jack Rosenthal Reviewed-by: Jett Rink Reviewed-by: Hebo Hu Reviewed-by: Jack Rosenthal Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1609608 Commit-Queue: Jett Rink Tested-by: Jett Rink --- chip/ish/aontaskfw/ish_aontask.c | 3 +++ chip/ish/power_mgt.c | 16 ---------------- 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, -- cgit v1.2.1