diff options
Diffstat (limited to 'src/soc/mediatek/mt8195')
-rw-r--r-- | src/soc/mediatek/mt8195/Makefile.inc | 2 | ||||
-rw-r--r-- | src/soc/mediatek/mt8195/include/soc/wdt.h | 14 | ||||
-rw-r--r-- | src/soc/mediatek/mt8195/wdt.c | 17 |
3 files changed, 15 insertions, 18 deletions
diff --git a/src/soc/mediatek/mt8195/Makefile.inc b/src/soc/mediatek/mt8195/Makefile.inc index a96788e874..8262763ef1 100644 --- a/src/soc/mediatek/mt8195/Makefile.inc +++ b/src/soc/mediatek/mt8195/Makefile.inc @@ -15,7 +15,7 @@ bootblock-y += ../common/mmu_operations.c bootblock-$(CONFIG_PCI) += pcie.c bootblock-y += ../common/pll.c pll.c bootblock-y += ../common/tracker.c ../common/tracker_v2.c -bootblock-y += ../common/wdt.c wdt.c +bootblock-y += ../common/wdt.c ../common/wdt_req.c wdt.c romstage-y += ../common/cbmem.c romstage-y += ../common/clkbuf.c diff --git a/src/soc/mediatek/mt8195/include/soc/wdt.h b/src/soc/mediatek/mt8195/include/soc/wdt.h new file mode 100644 index 0000000000..5cfb07971e --- /dev/null +++ b/src/soc/mediatek/mt8195/include/soc/wdt.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#ifndef SOC_MEDIATEK_MT8195_WDT_H +#define SOC_MEDIATEK_MT8195_WDT_H + +#include <soc/wdt_common.h> + +#define MTK_WDT_SPM_THERMAL_VAL 1 + +DEFINE_BIT(MTK_WDT_SPM_THERMAL_EN, 0) +DEFINE_BIT(MTK_WDT_THERMAL_EN, 18) +DEFINE_BIT(MTK_WDT_THERMAL_IRQ, 18) + +#endif /* SOC_MEDIATEK_MT8195_WDT_H */ diff --git a/src/soc/mediatek/mt8195/wdt.c b/src/soc/mediatek/mt8195/wdt.c index ab2934bbc7..fcee3db21a 100644 --- a/src/soc/mediatek/mt8195/wdt.c +++ b/src/soc/mediatek/mt8195/wdt.c @@ -5,23 +5,6 @@ #include <soc/wdt.h> #define MTK_WDT_CLR_STATUS 0x230001FF -#define MTK_WDT_REQ_MOD_KEY_VAL 0x33 -#define MTK_WDT_REQ_IRQ_KEY_VAL 0x44 - -DEFINE_BITFIELD(MTK_WDT_REQ_MOD_KEY, 31, 24) -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_set_req(void) -{ - SET32_BITFIELDS(&mtk_wdt->wdt_req_mode, - 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) { |