Skip to content
Snippets Groups Projects
Commit 009e4648 authored by Michael Schwingen's avatar Michael Schwingen Committed by Albert ARIBAUD
Browse files

trigger hardware watchdog in IXP42x serial driver

parent 20f17281
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@
#include <common.h>
#include <asm/arch/ixp425.h>
#include <watchdog.h>
/*
* 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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment