Skip to contentSkip to conversation

FIX: watchdog timeout, while waiting for input

PATCH New Jens Scharsig 2 participants 2 messages Apr 9, 2010 – Apr 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 common/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
common/main.c +3 -0
index 3949a5b..f7e7c1c 100644
@@ -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();
Signature · 1 line
1.6.0.2
#1 lore raw

PATCH 1/1 FIX: watchdog timeout, while waiting for input

Dear Jens Scharsig,

Quoted 9 lines · In message <[email protected]> you wrote:

* add WATCHDOG_RESET to !tstc() loops
* prevents watchdog timeout, while waiting for input, if CONFIG_BOOT_RETRY_TIME or CONFIG_SHOW_ACTIVITY defined

---
 common/main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Experience is what causes a person to make new  mistakes  instead  of
old ones.