From: Ladislav Michl <Ladislav.Michl@seznam.cz>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ns16550: kick watchdog while waiting for a character
Date: Mon, 1 Feb 2010 23:34:25 +0100 [thread overview]
Message-ID: <20100201223425.GA4294@localhost.localdomain> (raw)
From: Ladislav Michl <ladis@linux-mips.org>
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>
---
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index 2fcc8c3..b3bf10b 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -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);
}
next reply other threads:[~2010-02-01 22:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-01 22:34 Ladislav Michl [this message]
2010-02-03 21:47 ` [U-Boot] [PATCH] ns16550: kick watchdog while waiting for a character Wolfgang Denk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100201223425.GA4294@localhost.localdomain \
--to=ladislav.michl@seznam.cz \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox