summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHu, Hebo <hebo.hu@intel.com>2019-05-07 16:42:03 +0800
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2019-05-13 17:51:24 +0000
commit397ccbb553fb1aac67fb1f0ff8154550de936c5c (patch)
tree15beef1c04dffcaf9791d43143a9148b3db81103
parent4becd0468c3626e614ef935062445c62e3641754 (diff)
downloadchrome-ec-397ccbb553fb1aac67fb1f0ff8154550de936c5c.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> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1609608 Commit-Queue: Jett Rink <jettrink@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org>
-rw-r--r--chip/ish/aontaskfw/ish_aontask.c3
-rw-r--r--chip/ish/power_mgt.c16
-rw-r--r--chip/ish/watchdog.c10
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,