From: Michael Schwingen Date: Sun, 22 May 2011 21:59:59 +0000 (+0200) Subject: trigger hardware watchdog in IXP42x serial driver X-Git-Tag: v2011.06~5^2~14 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=009e464802569bc97c03c52f76fdf7e38040b634;p=oweals%2Fu-boot.git trigger hardware watchdog in IXP42x serial driver Signed-off-by: Michael Schwingen --- diff --git a/drivers/serial/serial_ixp.c b/drivers/serial/serial_ixp.c index dd26af49b5..a9acd476c4 100644 --- a/drivers/serial/serial_ixp.c +++ b/drivers/serial/serial_ixp.c @@ -30,6 +30,7 @@ #include #include +#include /* * 14.7456 MHz @@ -85,7 +86,8 @@ int serial_init (void) void serial_putc (const char c) { /* wait for room in the tx FIFO on UART */ - while ((LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_TEMT) == 0); + while ((LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_TEMT) == 0) + WATCHDOG_RESET(); /* Reset HW Watchdog, if needed */ THR(CONFIG_SYS_IXP425_CONSOLE) = c; @@ -111,7 +113,8 @@ int serial_tstc (void) */ int serial_getc (void) { - while (!(LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_DR)); + while (!(LSR(CONFIG_SYS_IXP425_CONSOLE) & LSR_DR)) + WATCHDOG_RESET(); /* Reset HW Watchdog, if needed */ return (char) RBR(CONFIG_SYS_IXP425_CONSOLE) & 0xff; }