coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
wdt.h File Reference
#include <stdint.h>
#include <soc/addressmap.h>
Include dependency graph for wdt.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mtk_wdt_regs
 

Enumerations

enum  {
  MTK_WDT_MODE_KEY = 0x22000000 , MTK_WDT_MODE_DUAL_MODE = 1 << 6 , MTK_WDT_MODE_IRQ = 1 << 3 , MTK_WDT_MODE_EXTEN = 1 << 2 ,
  MTK_WDT_MODE_EXT_POL = 1 << 1 , MTK_WDT_MODE_ENABLE = 1 << 0
}
 
enum  { MTK_WDT_SWRST_KEY = 0x1209 , MTK_WDT_STA_SPM_RST = 1 << 1 , MTK_WDT_STA_SW_RST = 1 << 30 , MTK_WDT_STA_HW_RST = 1 << 31 }
 

Functions

void mtk_wdt_preinit (void)
 
int mtk_wdt_init (void)
 
void mtk_wdt_clr_status (void)
 

Variables

static struct mtk_wdt_regs *const mtk_wdt = (void *)RGU_BASE
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MTK_WDT_MODE_KEY 
MTK_WDT_MODE_DUAL_MODE 
MTK_WDT_MODE_IRQ 
MTK_WDT_MODE_EXTEN 
MTK_WDT_MODE_EXT_POL 
MTK_WDT_MODE_ENABLE 

Definition at line 24 of file wdt.h.

◆ anonymous enum

anonymous enum
Enumerator
MTK_WDT_SWRST_KEY 
MTK_WDT_STA_SPM_RST 
MTK_WDT_STA_SW_RST 
MTK_WDT_STA_HW_RST 

Definition at line 34 of file wdt.h.

Function Documentation

◆ mtk_wdt_clr_status()

void mtk_wdt_clr_status ( void  )

Definition at line 10 of file wdt.c.

References mtk_wdt, MTK_WDT_CLR_STATUS, MTK_WDT_CLR_STATUS_VAL, SET32_BITFIELDS, mtk_wdt_regs::wdt_mode, and write32().

Referenced by mtk_wdt_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ mtk_wdt_init()

◆ mtk_wdt_preinit()

void mtk_wdt_preinit ( void  )

Definition at line 19 of file wdt.c.

References mtk_wdt, MTK_WDT_REQ_MOD_KEY_VAL, SET32_BITFIELDS, and mtk_wdt_regs::wdt_req_mode.

Referenced by bootblock_soc_init().

Here is the caller graph for this function:

Variable Documentation

◆ mtk_wdt

struct mtk_wdt_regs* const mtk_wdt = (void *)RGU_BASE
static