Attention is currently required from: Xi Chen, Hung-Te Lin, Rex-BC Chen, Yu-Ping Wu. Yidi Lin has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/64861 )
Change subject: soc/mediatek: Enable thermal hardware reset for MT8192 and MT8195 ......................................................................
Patch Set 1:
(2 comments)
Patchset:
PS1: If the register definition of `req_mode` and `req_irq_en` and the set value are the same on those platforms, we can consider using a config to enable this feature.
For example,
static void enable_thermal_hw_reset(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); }
int mtk_wdt_init(void) { ... if (CONFIG(ENABLE_THERMAL_HW_RESET)) enable_thermal_hw_reset(); ... }
File src/soc/mediatek/mt8192/bootblock.c:
https://review.coreboot.org/c/coreboot/+/64861/comment/50e2f619_e31820c5 PS1, Line 14: mtk_wdt_preinit(); What about move this function call to mtk_wdt_init() and create a weak function like what mtk_wdt_clr_status() did ?