summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRex-BC Chen <rex-bc.chen@mediatek.corp-partner.google.com>2022-02-08 18:56:15 +0800
committerHung-Te Lin <hungte@chromium.org>2022-02-11 12:19:54 +0000
commit3c00c7ec6b1a26699f7aab39c6cb702aa16a3d42 (patch)
treede77724ca928284b1a2fc7d8312a96c94716c2e0 /src
parent981354415111902217c06ae379dd4d84cd8547df (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/soc/mediatek/common/wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/mediatek/common/wdt.c b/src/soc/mediatek/common/wdt.c
index 587e50f04c..4f8eff282e 100644
--- a/src/soc/mediatek/common/wdt.c
+++ b/src/soc/mediatek/common/wdt.c
@@ -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");