From 4c6dfbc2c10a14fb816c681fb03b601412ea7c3b Mon Sep 17 00:00:00 2001 From: Tristan Shieh Date: Fri, 1 Jun 2018 14:33:11 +0800 Subject: mediatek/mt8183: Add watchdog timer support Using common watchdog timer (WDT) code for reset. Set up watchdog timer in mtk_wdt_init() to get reset status and disable auto-reboot. Link common do_hard_reset() to support hard reset. BUG=b:80501386 BRANCH=none TEST=both mtk_wdt_init() and do_hard_reset() work on Kukui. Change-Id: I4be3a133dbb8a64604133cefb0c5f02d01afd0d4 Signed-off-by: Tristan Shieh Reviewed-on: https://review.coreboot.org/27026 Reviewed-by: Paul Menzel Reviewed-by: Julius Werner Tested-by: build bot (Jenkins) --- src/soc/mediatek/mt8183/bootblock.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/soc/mediatek/mt8183/bootblock.c (limited to 'src/soc/mediatek/mt8183/bootblock.c') diff --git a/src/soc/mediatek/mt8183/bootblock.c b/src/soc/mediatek/mt8183/bootblock.c new file mode 100644 index 0000000000..4eca0f145c --- /dev/null +++ b/src/soc/mediatek/mt8183/bootblock.c @@ -0,0 +1,22 @@ +/* + * This file is part of the coreboot project. + * + * Copyright 2018 MediaTek Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include +#include + +void bootblock_soc_init(void) +{ + mtk_wdt_init(); +} -- cgit v1.2.3