From 43f0dcbb7700da216039909992951f8b7b64b071 Mon Sep 17 00:00:00 2001 From: CK Hu Date: Wed, 13 May 2020 12:32:36 +0800 Subject: soc/mediatek/mt8192: Initialize watch dog in bootblock Initialize watch dog so the system won't reboot on timeout. In addition, print the reason of reboot triggered by watch dog. Signed-off-by: CK Hu Change-Id: I7e849659700218f1c50365c2d68a32be2f703d94 Reviewed-on: https://review.coreboot.org/c/coreboot/+/44434 Tested-by: build bot (Jenkins) Reviewed-by: Hung-Te Lin --- src/soc/mediatek/mt8192/Makefile.inc | 1 + src/soc/mediatek/mt8192/bootblock.c | 2 ++ 2 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/soc/mediatek/mt8192/Makefile.inc b/src/soc/mediatek/mt8192/Makefile.inc index 0ba9feb29f..2a825fbdec 100644 --- a/src/soc/mediatek/mt8192/Makefile.inc +++ b/src/soc/mediatek/mt8192/Makefile.inc @@ -6,6 +6,7 @@ bootblock-y += ../common/mmu_operations.c bootblock-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c bootblock-y += ../common/timer.c bootblock-y += ../common/uart.c +bootblock-y += ../common/wdt.c verstage-y += ../common/gpio.c gpio.c verstage-$(CONFIG_SPI_FLASH) += ../common/spi.c spi.c diff --git a/src/soc/mediatek/mt8192/bootblock.c b/src/soc/mediatek/mt8192/bootblock.c index f48e78c309..770c6031da 100644 --- a/src/soc/mediatek/mt8192/bootblock.c +++ b/src/soc/mediatek/mt8192/bootblock.c @@ -2,8 +2,10 @@ #include #include +#include void bootblock_soc_init(void) { mtk_mmu_init(); + mtk_wdt_init(); } -- cgit v1.2.3