projects
/
oweals
/
u-boot.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
serial: sandbox: optimize puts
[oweals/u-boot.git]
/
drivers
/
serial
/
serial_ixp.c
diff --git
a/drivers/serial/serial_ixp.c
b/drivers/serial/serial_ixp.c
index dd26af49b54d00e21fb5dac5519dd82031cdcfa8..a9acd476c45f2eaceae149fc444c1c3dc66f6d56 100644
(file)
--- a/
drivers/serial/serial_ixp.c
+++ b/
drivers/serial/serial_ixp.c
@@
-30,6
+30,7
@@
#include <common.h>
#include <asm/arch/ixp425.h>
#include <common.h>
#include <asm/arch/ixp425.h>
+#include <watchdog.h>
/*
* 14.7456 MHz
/*
* 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 */
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;
THR(CONFIG_SYS_IXP425_CONSOLE) = c;
@@
-111,7
+113,8
@@
int serial_tstc (void)
*/
int serial_getc (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;
}
return (char) RBR(CONFIG_SYS_IXP425_CONSOLE) & 0xff;
}