public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ns16550: kick watchdog while waiting for a character
@ 2010-02-01 22:34 Ladislav Michl
  2010-02-03 21:47 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Ladislav Michl @ 2010-02-01 22:34 UTC (permalink / raw)
  To: u-boot

From: Ladislav Michl <ladis@linux-mips.org>

ns16550 busyloops waiting for incoming byte causing watchdog to reboot
while waiting for a key press. A call to WATCHDOG_RESET in NS16550_getc
loop fixes it.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
---

diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 2fcc8c3..b3bf10b 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -6,6 +6,7 @@
 
 #include <config.h>
 #include <ns16550.h>
+#include <watchdog.h>
 
 #define UART_LCRVAL UART_LCR_8N1		/* 8 data, 1 stop, no parity */
 #define UART_MCRVAL (UART_MCR_DTR | \
@@ -70,6 +71,7 @@ char NS16550_getc (NS16550_t com_port)
 		extern void usbtty_poll(void);
 		usbtty_poll();
 #endif
+		WATCHDOG_RESET();
 	}
 	return (com_port->rbr);
 }

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-02-03 21:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-01 22:34 [U-Boot] [PATCH] ns16550: kick watchdog while waiting for a character Ladislav Michl
2010-02-03 21:47 ` Wolfgang Denk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox