Skip to contentSkip to conversation

ns16550: kick watchdog while waiting for a character

PATCH New Ladislav Michl 2 participants 2 messages Feb 1, 2010 – Feb 3, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ns16550: kick watchdog while waiting for a character

From: Ladislav Michl <[email protected]>

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.

---

drivers/serial/ns16550.c +2 -0
index 2fcc8c3..b3bf10b 100644
@@ -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);
 }
#1 lore raw

PATCH 1/1 ns16550: kick watchdog while waiting for a character

Dear Ladislav Michl,

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

From: Ladislav Michl <[email protected]>

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.

---

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
Don't you know anything? I should have thought anyone knows that  who
knows anything about anything...      - Terry Pratchett, _Soul Music_