coreboot/src/soc/mediatek/common
Runyang Chen 268a18d58c soc/mediatek/common: Reset the watchdog timer before triggering reset
When the watchdog timer reaches 0, the timer value won't reset to the
default value unless there is an external reset or a kick. It will
result in the watchdog failing to trigger the reset signal.

We kick the watchdog to reset the timer to the default value. Also,
because WDT hardware needs about 94us to synchronize the registers,
add a 100us delay before triggering the reset signal.

BUG=b:264003005, b:264017048
BRANCH=corsola
TEST= Reboot successfully with the following cmd
      stop daisydog
      sleep 60 > /dev/watchdog&

Signed-off-by: Runyang Chen <runyang.chen@mediatek.corp-partner.google.com>
Signed-off-by: Kuan-Hsun Cheng <allen-kh.cheng@mediatek.com>
Change-Id: Ic4964103d54910c4a1e675b59c362e93c2213b19
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71754
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-01-10 09:39:51 +00:00
..
dp soc/mediatek: Add error handling for dptx_get_edid() 2022-11-23 16:31:29 +00:00
include/soc soc/mediatek/common: Reset the watchdog timer before triggering reset 2023-01-10 09:39:51 +00:00
auxadc.c
bl31.c soc/mediatek: a common implementation to register BL31 reset 2022-09-07 09:20:25 +00:00
cbmem.c cbmem_top_chipset: Change the return value to uintptr_t 2022-11-18 16:00:45 +00:00
clkbuf.c soc/mediatek: Use "if (!ptr)" in preference to "if (ptr == NULL)" 2022-09-14 12:49:44 +00:00
cpu_id.c soc/mediatek/mt8186: Add support for reading CPU ID 2022-10-21 14:52:17 +00:00
ddp.c
devapc.c soc/mediatek: Add DEVAPC_DEBUG option 2022-12-23 12:55:22 +00:00
dfd.c
dpm.c
dpm_4ch.c soc/mediatek: Move dpm_4ch.c to common 2022-08-31 16:42:44 +00:00
dram_init.c src/soc/mediatek: Remove unused <console/console.h> 2022-03-27 15:32:18 +00:00
dramc_param.c
dsi.c commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
early_init.c soc/mediatek/early_init: Fix function return type 2022-03-31 01:50:42 +00:00
eint_event.c
emi.c mem_chip_info: Update to new format 2022-12-09 00:48:57 +00:00
flash_controller.c soc/mediatek: Move FLASH_DUAL_READ to common 2022-07-06 15:33:07 +00:00
gpio.c
gpio_op.c soc/mediatek: Move some gpio functions to common/gpio_op.c 2022-07-06 15:22:20 +00:00
i2c.c soc/mediatek/i2c.c: Remove unused variables 2022-03-25 19:25:56 +00:00
Kconfig soc/mediatek: Add DEVAPC_DEBUG option 2022-12-23 12:55:22 +00:00
lastbus.c soc/mediatek/mt8186: Enable lastbus debug hardware 2022-09-09 10:45:08 +00:00
mcu.c timer: Change timer util functions to 64-bit 2022-09-14 11:55:39 +00:00
mcupm.c soc/mediatek/common: Use write32p() 2022-12-13 14:26:41 +00:00
memory.c mem_chip_info: Update to new format 2022-12-09 00:48:57 +00:00
memory_test.c
mmu_cmops.c
mmu_operations.c
msdc.c soc/mediatek: Use "if (!ptr)" in preference to "if (ptr == NULL)" 2022-09-14 12:49:44 +00:00
mt6315.c soc/mediatek: Move SPMI device table to SoC folder 2022-07-13 10:43:36 +00:00
mt6359p.c timer: Change timer util functions to 64-bit 2022-09-14 11:55:39 +00:00
mtcmos.c soc/mediatek/mt8188: Update mtcmos settings for display and audio 2022-10-25 08:30:15 +00:00
mtk_mipi_dphy.c
pcie.c lib/coreboot_table: Rename lb_fill_pcie 2022-11-04 19:17:49 +00:00
pll.c soc/mediatek: Unify PLL function names 2022-10-21 14:57:09 +00:00
pmic_wrap.c soc/mediatek: Use "if (!ptr)" in preference to "if (ptr == NULL)" 2022-09-14 12:49:44 +00:00
pmif.c soc/mediatek/mt8186: Add PWRAP_WITH_PMIF_SPMI Kconfig option 2022-10-21 14:52:42 +00:00
pmif_clk.c soc/mediatek/mt8188: Use MHz as unit for current_clk 2022-08-31 16:47:22 +00:00
pmif_spi.c
pmif_spmi.c soc/mediatek: Move SPMI interface configuration to SoC folder 2022-10-21 14:53:53 +00:00
reset.c
rtc.c
rtc_mt6359p.c soc/mediatek: Use "if (!ptr)" in preference to "if (ptr == NULL)" 2022-09-14 12:49:44 +00:00
rtc_osc_init.c
spi.c soc/mediatek: Create GET_TICK_DLY_REG macro for SPI tick delay setting 2022-07-29 15:05:33 +00:00
spm.c timer: Change timer util functions to 64-bit 2022-09-14 11:55:39 +00:00
sspm.c
timer.c
timer_prepare.c soc/mediatek: Make timer_prepare() a common function 2022-07-06 15:21:35 +00:00
tracker.c
tracker_v1.c
tracker_v2.c
uart.c lib/coreboot_table: Simplify API to set up lb_serial 2022-11-04 19:17:13 +00:00
ufs.c
usb.c
wdt.c soc/mediatek/common: Reset the watchdog timer before triggering reset 2023-01-10 09:39:51 +00:00
wdt_req.c soc/mediatek: Move wdt_set_req() to common folder 2022-07-06 15:20:42 +00:00