On Wed, Aug 13, 2008 at 3:27 AM, Atsuo Igarashi <atsuo_igarashi@xxxxxxxxxxxxxx> wrote: > Add console polling routines for the imx uart with kgdboc. > > Signed-off-by Atsuo Igarashi <atsuo_igarashi@xxxxxxxxxxxxxx> > 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. -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html