mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-14 00:26:30 +00:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user