diff options
author | Aurelien Jarno <aurelien@aurel32.net> | 2022-01-05 08:20:39 +0100 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2022-01-21 21:44:57 +0530 |
commit | fb688d9e9d4099d6945c9e460b9cd2c8c4d8a29b (patch) | |
tree | 18f57f4547221c9db93f042fc970eea10723683c /lib/utils/serial/uart8250.c | |
parent | 8257262dbf4fc934c2f21a42dcd9c0f41a378d46 (diff) | |
download | opensbi-fb688d9e9d4099d6945c9e460b9cd2c8c4d8a29b.zip opensbi-fb688d9e9d4099d6945c9e460b9cd2c8c4d8a29b.tar.gz opensbi-fb688d9e9d4099d6945c9e460b9cd2c8c4d8a29b.tar.bz2 |
platform: sifive_fu740: fix reset when watchdog is running
When the watchdog is running the HiFive Unmatched board does not reboot
properly and shuts down itself a few seconds after reboot, in the early
stages of the u-boot loading. On a Linux kernel this happens when the
da9063_wdt module is loaded. This does not happen if the module is
unloaded before reboot or if the watchdog module is loaded with
"stop_on_reboot=1".
Fix that by stopping the watchdog before attempting to reset the board.
This is done by zeroing the TWDSCALE field of CONTROL_D register, unless
it was already set to 0.
Reported-by: Tianon Gravi <tianon@debian.org>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Nikita Shubin <n.shubin@yadro.com>
Tested-by: Nikita Shubin <n.shubin@yadro.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'lib/utils/serial/uart8250.c')
0 files changed, 0 insertions, 0 deletions