From: "Andrew Dyer" <amdyer@gmail.com>
To: Atsuo Igarashi <atsuo_igarashi@tripeaks.co.jp>
Cc: linux-serial@vger.kernel.org,
linux-arm-kernel@lists.arm.linux.org.uk, kernel@pengutronix.de
Subject: Re: [PATCH] serial: imx: add console polling routines for kgdboc
Date: Fri, 15 Aug 2008 10:10:03 -0500 [thread overview]
Message-ID: <c166aa9f0808150810r6aba0889w5ceef50d7b6d6b73@mail.gmail.com> (raw)
In-Reply-To: <48A29AFB.9070502@tripeaks.co.jp>
On Wed, Aug 13, 2008 at 3:27 AM, Atsuo Igarashi
<atsuo_igarashi@tripeaks.co.jp> wrote:
> Add console polling routines for the imx uart with kgdboc.
>
> Signed-off-by Atsuo Igarashi <atsuo_igarashi@tripeaks.co.jp>
>
In imx_get_poll_char() the code returns the result of reading the urxd
register. That register has the 8 bits of receive data in it, but in
the next byte up also has 4 bits of error flags (overrun, frame,
break, parity) and an error summary bit which are being ignored.
Maybe something like this?
static int imx_get_poll_char(struct uart_port *port)
{
struct imx_port *sport = (struct imx_port *)port;
int ch;
while (1) {
while (!(readl(sport->port.membase + USR2) & USR2_RDR));
ch = readl(sport->port.membase + URXD0);
if (!(ch & URXD_ERR))
return(ch & 0xff);
/* else throw away the char with the error and try
again (or return an error value?) */
}
}
--
Hardware, n.:
The parts of a computer system that can be kicked.
prev parent reply other threads:[~2008-08-15 15:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-13 8:27 [PATCH] serial: imx: add console polling routines for kgdboc Atsuo Igarashi
2008-08-15 6:31 ` Sascha Hauer
2008-08-15 15:10 ` Andrew Dyer [this message]
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=c166aa9f0808150810r6aba0889w5ceef50d7b6d6b73@mail.gmail.com \
--to=amdyer@gmail.com \
--cc=atsuo_igarashi@tripeaks.co.jp \
--cc=kernel@pengutronix.de \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-serial@vger.kernel.org \
/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