diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/soc/mediatek/common/include/soc/wdt.h | 2 | ||||
-rw-r--r-- | src/soc/mediatek/common/wdt.c | 3 | ||||
-rw-r--r-- | src/soc/mediatek/mt8186/bootblock.c | 1 | ||||
-rw-r--r-- | src/soc/mediatek/mt8186/wdt.c | 2 | ||||
-rw-r--r-- | src/soc/mediatek/mt8192/wdt.c | 2 | ||||
-rw-r--r-- | src/soc/mediatek/mt8195/wdt.c | 2 |
6 files changed, 7 insertions, 5 deletions
diff --git a/src/soc/mediatek/common/include/soc/wdt.h b/src/soc/mediatek/common/include/soc/wdt.h index 5494ff86ef..1277436e3c 100644 --- a/src/soc/mediatek/common/include/soc/wdt.h +++ b/src/soc/mediatek/common/include/soc/wdt.h @@ -41,8 +41,8 @@ enum { static struct mtk_wdt_regs *const mtk_wdt = (void *)RGU_BASE; -void mtk_wdt_preinit(void); int mtk_wdt_init(void); void mtk_wdt_clr_status(void); +void mtk_wdt_set_req(void); #endif /* SOC_MEDIATEK_COMMON_WDT_H */ diff --git a/src/soc/mediatek/common/wdt.c b/src/soc/mediatek/common/wdt.c index d58ac32b33..7ae4661011 100644 --- a/src/soc/mediatek/common/wdt.c +++ b/src/soc/mediatek/common/wdt.c @@ -8,6 +8,7 @@ #include <vendorcode/google/chromeos/chromeos.h> __weak void mtk_wdt_clr_status(void) { /* do nothing */ } +__weak void mtk_wdt_set_req(void) { /* do nothing */ } static inline void mtk_wdt_swreset(void) { @@ -32,6 +33,8 @@ int mtk_wdt_init(void) { uint32_t wdt_sta; + mtk_wdt_set_req(); + /* Writing mode register will clear status register */ wdt_sta = read32(&mtk_wdt->wdt_status); diff --git a/src/soc/mediatek/mt8186/bootblock.c b/src/soc/mediatek/mt8186/bootblock.c index 29de7fbe77..e5d1e73047 100644 --- a/src/soc/mediatek/mt8186/bootblock.c +++ b/src/soc/mediatek/mt8186/bootblock.c @@ -12,7 +12,6 @@ void bootblock_soc_init(void) { mtk_mmu_init(); bustracker_init(); - mtk_wdt_preinit(); mtk_wdt_init(); mt_pll_init(); unmask_eint_event_mask(); diff --git a/src/soc/mediatek/mt8186/wdt.c b/src/soc/mediatek/mt8186/wdt.c index 39bc2835c8..5303f9d566 100644 --- a/src/soc/mediatek/mt8186/wdt.c +++ b/src/soc/mediatek/mt8186/wdt.c @@ -20,7 +20,7 @@ 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) +void mtk_wdt_set_req(void) { SET32_BITFIELDS(&mtk_wdt->wdt_req_mode, MTK_WDT_SPM_THERMAL_EN, 0, diff --git a/src/soc/mediatek/mt8192/wdt.c b/src/soc/mediatek/mt8192/wdt.c index 8c8959a420..d3e3e74921 100644 --- a/src/soc/mediatek/mt8192/wdt.c +++ b/src/soc/mediatek/mt8192/wdt.c @@ -12,7 +12,7 @@ DEFINE_BITFIELD(MTK_WDT_REQ_IRQ_KEY, 31, 24) DEFINE_BIT(MTK_WDT_THERMAL_EN, 18) DEFINE_BIT(MTK_WDT_THERMAL_IRQ, 18) -void mtk_wdt_preinit(void) +void mtk_wdt_set_req(void) { SET32_BITFIELDS(&mtk_wdt->wdt_req_mode, MTK_WDT_THERMAL_EN, 1, diff --git a/src/soc/mediatek/mt8195/wdt.c b/src/soc/mediatek/mt8195/wdt.c index 54038c98aa..ab2934bbc7 100644 --- a/src/soc/mediatek/mt8195/wdt.c +++ b/src/soc/mediatek/mt8195/wdt.c @@ -13,7 +13,7 @@ DEFINE_BITFIELD(MTK_WDT_REQ_IRQ_KEY, 31, 24) DEFINE_BIT(MTK_WDT_THERMAL_EN, 18) DEFINE_BIT(MTK_WDT_THERMAL_IRQ, 18) -void mtk_wdt_preinit(void) +void mtk_wdt_set_req(void) { SET32_BITFIELDS(&mtk_wdt->wdt_req_mode, MTK_WDT_THERMAL_EN, 1, |