diff options
author | Wealian Liao <whliao@nuvoton.corp-partner.google.com> | 2021-01-06 09:41:01 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-22 23:41:29 +0000 |
commit | 4d8e52a348b4b03549d75048e920a1b4a0aec75b (patch) | |
tree | ec8f2a4827c3434d536587fa652201d98a3667ea /zephyr/app/ec | |
parent | e0b50372154ff2f0cdc094548e563de330d13018 (diff) | |
download | chrome-ec-4d8e52a348b4b03549d75048e920a1b4a0aec75b.tar.gz |
zephyr: add watchdog
In npcx7 series, the Timer and Watchdog module (TWD) generates the
clocks and interrupts used for timing periodic functions in the system.
It also provides watchdog reset signal generation in response to a
failure detection. This CL enables the watchdog functionality in zephyr
system.
BUG=b:176523207, b:177604307
BRANCH=None.
TEST=add stall function to check the system can reset by the watchdog
Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com>
Change-Id: Iee0312dd6132ce76e622178b3a666aa415bc735a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2659135
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'zephyr/app/ec')
-rw-r--r-- | zephyr/app/ec/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/zephyr/app/ec/main.c b/zephyr/app/ec/main.c index 9311aa60be..f1b3d24c69 100644 --- a/zephyr/app/ec/main.c +++ b/zephyr/app/ec/main.c @@ -11,6 +11,7 @@ #include "hooks.h" #include "keyboard_scan.h" #include "system.h" +#include "watchdog.h" #include "zephyr_espi_shim.h" void main(void) @@ -30,6 +31,10 @@ void main(void) init_reset_log(); } + if (IS_ENABLED(CONFIG_PLATFORM_EC_WATCHDOG)) { + watchdog_init(); + } + if (IS_ENABLED(HAS_TASK_KEYSCAN)) { keyboard_scan_init(); } |