public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jens Scharsig <js_at_ng@scharsoft.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] FIX: watchdog timeout, while waiting for input
Date: Fri, 09 Apr 2010 19:02:38 +0200	[thread overview]
Message-ID: <4BBF5DAE.9000608@scharsoft.de> (raw)

* 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>
---
 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();
-- 
1.6.0.2

             reply	other threads:[~2010-04-09 17:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-09 17:02 Jens Scharsig [this message]
2010-04-10 21:31 ` [U-Boot] [PATCH] FIX: watchdog timeout, while waiting for input Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BBF5DAE.9000608@scharsoft.de \
    --to=js_at_ng@scharsoft.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox