summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,