]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
ns16550: kick watchdog while waiting for a character
authorLadislav Michl <ladis@linux-mips.org>
Mon, 1 Feb 2010 22:34:25 +0000 (23:34 +0100)
committerWolfgang Denk <wd@denx.de>
Wed, 3 Feb 2010 21:46:58 +0000 (22:46 +0100)
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>
drivers/serial/ns16550.c

index 2fcc8c31633ab9d41e859847c17b02e9d0805545..b3bf10bb19cc4a8320b2d9609dea3dd98ec978b6 100644 (file)
@@ -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);
 }