summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTinghan Shen <tinghan.shen@mediatek.com>2021-12-23 16:49:50 +0800
committerCommit Bot <commit-bot@chromium.org>2021-12-23 15:47:23 +0000
commit3bab7efffc2349e8bcdee6e07f2cc2fb9a38d0b5 (patch)
tree871ec13f29089fbd43f863aaf27960a8513f157f
parentbb1aad27f65c90bd3af3a99ae63bedc695153cac (diff)
downloadchrome-ec-3bab7efffc2349e8bcdee6e07f2cc2fb9a38d0b5.tar.gz
chip/mt_scp: rename watchdog enable/disable API
Align watchdog API naming to watchdog_<operation>. BRANCH=None BUG=b:189356151 TEST=make BOARD=cherry_scp ok Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Change-Id: Id8393da204cc9f7ea1f00b0f1d4685773ffe13b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3354269 Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org> Commit-Queue: Tzung-Bi Shih <tzungbi@chromium.org> Tested-by: Tzung-Bi Shih <tzungbi@chromium.org>
-rw-r--r--chip/mt_scp/mt8195/clock.c4
-rw-r--r--chip/mt_scp/rv32i_common/scp_watchdog.h4
-rw-r--r--chip/mt_scp/rv32i_common/watchdog.c6
3 files changed, 7 insertions, 7 deletions
diff --git a/chip/mt_scp/mt8195/clock.c b/chip/mt_scp/mt8195/clock.c
index 1ad1706e6a..eac6436a46 100644
--- a/chip/mt_scp/mt8195/clock.c
+++ b/chip/mt_scp/mt8195/clock.c
@@ -378,11 +378,11 @@ power_chipset_handle_host_sleep_event(enum host_sleep_event state,
{
if (state == HOST_SLEEP_EVENT_S3_SUSPEND) {
CPRINTS("AP suspend");
- disable_watchdog();
+ watchdog_disable();
clock_select_clock(SCP_CLK_SYSTEM);
} else if (state == HOST_SLEEP_EVENT_S3_RESUME) {
clock_select_clock(SCP_CLK_ULPOSC2_HIGH_SPEED);
- enable_watchdog();
+ watchdog_enable();
CPRINTS("AP resume");
}
}
diff --git a/chip/mt_scp/rv32i_common/scp_watchdog.h b/chip/mt_scp/rv32i_common/scp_watchdog.h
index 0277aeaec7..87309a2f82 100644
--- a/chip/mt_scp/rv32i_common/scp_watchdog.h
+++ b/chip/mt_scp/rv32i_common/scp_watchdog.h
@@ -9,7 +9,7 @@
#include "watchdog.h"
-void disable_watchdog(void);
-void enable_watchdog(void);
+void watchdog_disable(void);
+void watchdog_enable(void);
#endif /* __SCP_WATCHDOG_H */
diff --git a/chip/mt_scp/rv32i_common/watchdog.c b/chip/mt_scp/rv32i_common/watchdog.c
index 05acf6ea29..f77a948da3 100644
--- a/chip/mt_scp/rv32i_common/watchdog.c
+++ b/chip/mt_scp/rv32i_common/watchdog.c
@@ -17,7 +17,7 @@ void watchdog_reload(void)
}
DECLARE_HOOK(HOOK_TICK, watchdog_reload, HOOK_PRIO_DEFAULT);
-void disable_watchdog(void)
+void watchdog_disable(void)
{
/* disable watchdog */
SCP_CORE0_WDT_CFG &= ~WDT_EN;
@@ -25,7 +25,7 @@ void disable_watchdog(void)
SCP_CORE0_WDT_IRQ |= BIT(0);
}
-void enable_watchdog(void)
+void watchdog_enable(void)
{
const uint32_t timeout = WDT_PERIOD(CONFIG_WATCHDOG_PERIOD_MS);
@@ -41,7 +41,7 @@ void enable_watchdog(void)
int watchdog_init(void)
{
- enable_watchdog();
+ watchdog_enable();
return EC_SUCCESS;
}