mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-28 02:35:28 +00:00
cleanup: Poke the watchdog when dumping lots of memory
If you use the "md" command to display lots of memory, it can cause the watchdog to trip. This just pokes it every now and then to be sure it's happy. BUG=none BRANCH=none TEST=manual Print a lot, see that it doesn't timeout: md 0 0x4000 Change-Id: Ic4e2746c07f4fbdf922e87ea3efbe90b88ae08c9 Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/251011 Reviewed-by: Randall Spangler <rspangler@chromium.org>
This commit is contained in:
committed by
ChromeOS Commit Bot
parent
91268fb85e
commit
86340a75d2
@@ -6,7 +6,9 @@
|
||||
/* System module for Chrome EC */
|
||||
|
||||
#include "console.h"
|
||||
#include "timer.h"
|
||||
#include "util.h"
|
||||
#include "watchdog.h"
|
||||
|
||||
static int command_mem_dump(int argc, char **argv)
|
||||
{
|
||||
@@ -31,6 +33,13 @@ static int command_mem_dump(int argc, char **argv)
|
||||
else
|
||||
ccprintf(" %08x", value);
|
||||
cflush();
|
||||
|
||||
/* Lots of output could take a while.
|
||||
* Let other things happen, too */
|
||||
if (!(i % 0x100)) {
|
||||
watchdog_reload();
|
||||
usleep(10 * MSEC);
|
||||
}
|
||||
}
|
||||
ccprintf("\n");
|
||||
cflush();
|
||||
|
||||
Reference in New Issue
Block a user