diff options
author | Jens Scharsig <js_at_ng@scharsoft.de> | 2010-04-09 19:02:38 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-04-10 23:31:31 +0200 |
commit | 30dc165a76b5165af77219189bc05d0fa4229d8b (patch) | |
tree | e271c268cad8698c31d0570c9cfae87ce32d0b69 /common | |
parent | 8178110bc28249f3ff1c22b15d7dcdee50be69eb (diff) | |
download | u-boot-imx-30dc165a76b5165af77219189bc05d0fa4229d8b.zip u-boot-imx-30dc165a76b5165af77219189bc05d0fa4229d8b.tar.gz u-boot-imx-30dc165a76b5165af77219189bc05d0fa4229d8b.tar.bz2 |
FIX: watchdog timeout, while waiting for input
* add WATCHDOG_RESET to !tstc() loops
* prevents watchdog timeout, while waiting for input,
if CONFIG_BOOT_RETRY_TIME or CONFIG_SHOW_ACTIVITY defined
Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
Diffstat (limited to 'common')
-rw-r--r-- | common/main.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c index 3949a5b..f7e7c1c 100644 --- a/common/main.c +++ b/common/main.c @@ -730,6 +730,7 @@ static int cread_line(const char *const prompt, char *buf, unsigned int *len) while (!tstc()) { /* while no incoming data */ if (retry_time >= 0 && get_ticks() > endtime) return (-2); /* timed out */ + WATCHDOG_RESET(); } #endif @@ -997,6 +998,7 @@ int readline_into_buffer (const char *const prompt, char * buffer) while (!tstc()) { /* while no incoming data */ if (retry_time >= 0 && get_ticks() > endtime) return (-2); /* timed out */ + WATCHDOG_RESET(); } #endif WATCHDOG_RESET(); /* Trigger watchdog, if needed */ @@ -1005,6 +1007,7 @@ int readline_into_buffer (const char *const prompt, char * buffer) while (!tstc()) { extern void show_activity(int arg); show_activity(0); + WATCHDOG_RESET(); } #endif c = getc(); |