Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/62797 )
Change subject: soc/mediatek: Trigger wdt SW reset when wdt status is not equal to 0 ......................................................................
soc/mediatek: Trigger wdt SW reset when wdt status is not equal to 0
Because we close external signal in kernel driver since MT8195, it's more reasonable to trigger sw reset with exteranl signal again whenever the wdt status is not equal to 0.
BUG=none TEST=build pass
Signed-off-by: Rex-BC Chen rex-bc.chen@mediatek.com Change-Id: Ic6128df7eadaebcf7ff8d4c5492e3e0cfbab6e36 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62797 Reviewed-by: Yu-Ping Wu yupingso@google.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/soc/mediatek/common/wdt.c 1 file changed, 13 insertions(+), 10 deletions(-)
Approvals: build bot (Jenkins): Verified Yu-Ping Wu: Looks good to me, approved Rex-BC Chen: Looks good to me, but someone else must approve
diff --git a/src/soc/mediatek/common/wdt.c b/src/soc/mediatek/common/wdt.c index 108648f..d58ac32 100644 --- a/src/soc/mediatek/common/wdt.c +++ b/src/soc/mediatek/common/wdt.c @@ -40,18 +40,21 @@ printk(BIOS_INFO, "WDT: Status = %#x\n", wdt_sta);
printk(BIOS_INFO, "WDT: Last reset was "); - if (wdt_sta & MTK_WDT_STA_HW_RST) { - printk(BIOS_INFO, "hardware watchdog\n"); + if (!wdt_sta) { + printk(BIOS_INFO, "cold boot\n"); + } else { + if (wdt_sta & MTK_WDT_STA_HW_RST) + printk(BIOS_INFO, "hardware watchdog\n"); + else if (wdt_sta & MTK_WDT_STA_SW_RST) + printk(BIOS_INFO, "normal software reboot\n"); + else if (wdt_sta & MTK_WDT_STA_SPM_RST) + printk(BIOS_INFO, "SPM reboot\n"); + else + printk(BIOS_INFO, "other reset type: %#.8x\n", wdt_sta); + mark_watchdog_tombstone(); mtk_wdt_swreset(); - } else if (wdt_sta & MTK_WDT_STA_SW_RST) - printk(BIOS_INFO, "normal software reboot\n"); - else if (wdt_sta & MTK_WDT_STA_SPM_RST) - printk(BIOS_INFO, "SPM reboot\n"); - else if (!wdt_sta) - printk(BIOS_INFO, "cold boot\n"); - else - printk(BIOS_INFO, "unexpected reset type: %#.8x\n", wdt_sta); + }
/* Config watchdog reboot mode: * Clearing bits:
3 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.