From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Schwingen Date: Tue, 28 Dec 2010 13:43:21 +0100 Subject: [U-Boot] [PATCH 03/13] trigger hardware watchdog in IXP42x serial driver In-Reply-To: <1293540211-3684-1-git-send-email-michael@schwingen.org> References: <1293540211-3684-1-git-send-email-michael@schwingen.org> Message-ID: <1293540211-3684-4-git-send-email-michael@schwingen.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Signed-off-by: Michael Schwingen --- drivers/serial/serial_ixp.c | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/serial/serial_ixp.c b/drivers/serial/serial_ixp.c index dd26af4..5893fd2 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; } -- 1.7.2.3