diff options
author | Nick Sanders <nsanders@chromium.org> | 2018-04-09 23:17:29 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-04-10 21:55:19 -0700 |
commit | f305ec22d62005ca277e077676e45c015919c403 (patch) | |
tree | 6b34416fcf220f302cc52397fc73f1ad54365ae6 | |
parent | 46ca9738f23d91148519fdaf31e8791be49855e3 (diff) | |
download | chrome-ec-f305ec22d62005ca277e077676e45c015919c403.tar.gz |
stm32: implement reboot wait-ext
This was missed on stm32, but is helpful for servod
to work reliably.
BUG=b:77830536
TEST=it waits 10 sec for external reboot.
Change-Id: Ic4c905846c41b43f3b8542d70e021744716bd0c2
Signed-off-by: Nick Sanders <nsanders@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1004437
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
-rw-r--r-- | chip/stm32/system.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chip/stm32/system.c b/chip/stm32/system.c index d2c48cdc11..b77f0e8457 100644 --- a/chip/stm32/system.c +++ b/chip/stm32/system.c @@ -398,6 +398,15 @@ void system_reset(int flags) while (1) ; } else { + if (flags & SYSTEM_RESET_WAIT_EXT) { + int i; + + /* Wait 10 seconds for external reset */ + for (i = 0; i < 1000; i++) { + watchdog_reload(); + udelay(10000); + } + } CPU_NVIC_APINT = 0x05fa0004; } |