coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
wdt.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 /*
4  * This file is created based on MT8186 Functional Specification
5  * Chapter number: 3.4
6  */
7 
8 #include <device/mmio.h>
9 #include <soc/addressmap.h>
10 #include <soc/wdt.h>
11 
12 #define MTK_WDT_CLR_STATUS_VAL 0x22
13 #define MTK_WDT_REQ_MOD_KEY_VAL 0x33
14 
16 DEFINE_BITFIELD(MTK_WDT_REQ_MOD_KEY, 31, 24)
17 DEFINE_BIT(MTK_WDT_SPM_THERMAL_EN, 0)
18 
19 void mtk_wdt_preinit(void)
20 {
22  MTK_WDT_SPM_THERMAL_EN, 0,
23  MTK_WDT_REQ_MOD_KEY, MTK_WDT_REQ_MOD_KEY_VAL);
24 }
25 
27 {
30 }
__weak void mtk_wdt_clr_status(void)
Definition: wdt.c:10
#define DEFINE_BITFIELD(name, high_bit, low_bit)
Definition: mmio.h:124
#define DEFINE_BIT(name, bit)
Definition: mmio.h:131
#define SET32_BITFIELDS(addr,...)
Definition: mmio.h:201
#define MTK_WDT_CLR_STATUS_VAL
Definition: wdt.c:12
void mtk_wdt_preinit(void)
Definition: wdt.c:19
#define MTK_WDT_REQ_MOD_KEY_VAL
Definition: wdt.c:13
#define MTK_WDT_CLR_STATUS
Definition: wdt.c:7
u32 wdt_mode
Definition: wdt.h:10
u32 wdt_req_mode
Definition: wdt.h:18
static struct mtk_wdt_regs *const mtk_wdt
Definition: wdt.h:41