diff options
-rw-r--r-- | src/soc/mediatek/common/include/soc/wdt.h | 3 | ||||
-rw-r--r-- | src/soc/mediatek/mt8186/wdt.c | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/include/soc/wdt.h b/src/soc/mediatek/common/include/soc/wdt.h index ebf7f490f5..5494ff86ef 100644 --- a/src/soc/mediatek/common/include/soc/wdt.h +++ b/src/soc/mediatek/common/include/soc/wdt.h @@ -16,7 +16,8 @@ struct mtk_wdt_regs { u32 wdt_swsysrst; u32 reserved0[5]; u32 wdt_req_mode; - u32 reserved1[3]; + u32 wdt_req_irq_en; + u32 reserved1[2]; u32 wdt_debug_ctrl; }; diff --git a/src/soc/mediatek/mt8186/wdt.c b/src/soc/mediatek/mt8186/wdt.c index f9e0d8a3d7..39bc2835c8 100644 --- a/src/soc/mediatek/mt8186/wdt.c +++ b/src/soc/mediatek/mt8186/wdt.c @@ -11,16 +11,24 @@ #define MTK_WDT_CLR_STATUS_VAL 0x22 #define MTK_WDT_REQ_MOD_KEY_VAL 0x33 +#define MTK_WDT_REQ_IRQ_KEY_VAL 0x44 DEFINE_BITFIELD(MTK_WDT_CLR_STATUS, 31, 24) DEFINE_BITFIELD(MTK_WDT_REQ_MOD_KEY, 31, 24) +DEFINE_BITFIELD(MTK_WDT_REQ_IRQ_KEY, 31, 24) DEFINE_BIT(MTK_WDT_SPM_THERMAL_EN, 0) +DEFINE_BIT(MTK_WDT_THERMAL_EN, 18) +DEFINE_BIT(MTK_WDT_THERMAL_IRQ, 18) void mtk_wdt_preinit(void) { SET32_BITFIELDS(&mtk_wdt->wdt_req_mode, MTK_WDT_SPM_THERMAL_EN, 0, + MTK_WDT_THERMAL_EN, 1, MTK_WDT_REQ_MOD_KEY, MTK_WDT_REQ_MOD_KEY_VAL); + SET32_BITFIELDS(&mtk_wdt->wdt_req_irq_en, + MTK_WDT_THERMAL_IRQ, 0, + MTK_WDT_REQ_IRQ_KEY, MTK_WDT_REQ_IRQ_KEY_VAL); } void mtk_wdt_clr_status(void) |