soc/mediatek: Only update required bits when triggering WDT reset
To prevent to modify original value of wdt_mode, we use setbits32 to update required bits. BUG=b:218420108 TEST=build pass Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com> Change-Id: I743c1af3583c18ec8500fc1eb89f31cdbce5317c Reviewed-on: https://review.coreboot.org/c/coreboot/+/61729 Reviewed-by: Yu-Ping Wu <yupingso@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
9813544151
commit
3c00c7ec6b
|
@ -32,7 +32,7 @@ int mtk_wdt_init(void)
|
|||
* console (either in SRAM or DRAM) can be flushed.
|
||||
*/
|
||||
dcache_clean_all();
|
||||
write32(&mtk_wdt->wdt_mode, MTK_WDT_MODE_EXTEN | MTK_WDT_MODE_KEY);
|
||||
setbits32(&mtk_wdt->wdt_mode, MTK_WDT_MODE_EXTEN | MTK_WDT_MODE_KEY);
|
||||
write32(&mtk_wdt->wdt_swrst, MTK_WDT_SWRST_KEY);
|
||||
} else if (wdt_sta & MTK_WDT_STA_SW_RST)
|
||||
printk(BIOS_INFO, "normal software reboot\n");
|
||||
|
|
Loading…
Reference in New Issue