summaryrefslogtreecommitdiff
path: root/src/soc/mediatek/mt8188/wdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/mediatek/mt8188/wdt.c')
-rw-r--r--src/soc/mediatek/mt8188/wdt.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8188/wdt.c b/src/soc/mediatek/mt8188/wdt.c
new file mode 100644
index 0000000000..5218de39b8
--- /dev/null
+++ b/src/soc/mediatek/mt8188/wdt.c
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+/*
+ * This file is created based on MT8188 Functional Specification
+ * Chapter number: 3.10.10
+ */
+
+#include <device/mmio.h>
+#include <soc/addressmap.h>
+#include <soc/wdt.h>
+
+#define MTK_WDT_CLR_STATUS_VAL 0x22
+
+DEFINE_BITFIELD(MTK_WDT_CLR_STATUS, 31, 24)
+
+void mtk_wdt_clr_status(void)
+{
+ SET32_BITFIELDS(&mtk_wdt->wdt_mode,
+ MTK_WDT_CLR_STATUS, MTK_WDT_CLR_STATUS_VAL);
+}