summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLadislav Michl <ladis@linux-mips.org>2010-02-01 23:34:25 +0100
committerWolfgang Denk <wd@denx.de>2010-02-03 22:46:58 +0100
commita1b322a98319de568b3bc38029ef7e123643c1e8 (patch)
tree1bcfca1646cfeb2b1411776ddf7c7128c52944da /drivers
parent84d36b30181acfb72f22d1105c15574b30ea2fa1 (diff)
ns16550: kick watchdog while waiting for a character
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/serial/ns16550.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 2fcc8c3163..b3bf10bb19 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);
}