summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8186/wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/mediatek/mt8186/wdt.c')
-rw-r--r--src/soc/mediatek/mt8186/wdt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8186/wdt.c b/src/soc/mediatek/mt8186/wdt.c
index fbc9bb9989..f9e0d8a3d7 100644
--- a/src/soc/mediatek/mt8186/wdt.c
+++ b/src/soc/mediatek/mt8186/wdt.c
@@ -10,8 +10,18 @@
#include <soc/wdt.h>
#define MTK_WDT_CLR_STATUS_VAL 0x22
+#define MTK_WDT_REQ_MOD_KEY_VAL 0x33
DEFINE_BITFIELD(MTK_WDT_CLR_STATUS, 31, 24)
+DEFINE_BITFIELD(MTK_WDT_REQ_MOD_KEY, 31, 24)
+DEFINE_BIT(MTK_WDT_SPM_THERMAL_EN, 0)
+
+void mtk_wdt_preinit(void)
+{
+ SET32_BITFIELDS(&mtk_wdt->wdt_req_mode,
+ MTK_WDT_SPM_THERMAL_EN, 0,
+ MTK_WDT_REQ_MOD_KEY, MTK_WDT_REQ_MOD_KEY_VAL);
+}
void mtk_wdt_clr_status(void)
{