Thanks Kevin, that fixes the problem. ================================================== Andy,
This is a known issue which the attached patch to the 8250 serial driver fixes (special thanks to Dave Brownell for the patch.) The standard 8250 serial driver does some probing of the hardware which seems to confuse the davinci FIFO and interrupt settings. Simply disabling this probing makes the problem go away. I need to submit a fix to the serial driver maintainer which has an option for disabling this probing, but have not yet done so. Kevin From: David Brownell <[EMAIL PROTECTED]> Subject: 2.6.18-davinci, better UART behavior I've not tracked down just _why_ but the following patch makes the EVM console UART behave a lot better. The first part changes the rx irq threshold to one byte vs 8, and the second (seemingly more important) stops probing for a bug that doesn't appear to exist here. With this patch I've finally seen the 2.6.18 code come up "correctly" more than once ... without dropping TX characters once userspace starts opening/closing the serial console, without needing to be kicked several times during boot by sending carriage returns, and without getting into modes where typed characters get discarded. (On "reboot" the TX character droppage comes back though ...) One clue seems to be that the userspace open/close goofs things up big time ... as if working uart settings get mangled that way. Maybe with that clue, and this patch, and some time, someone else can come up with a Real Fix (tm) to those problems. --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -173,7 +174,8 @@ static const struct serial8250_config ua .name = "16550A", .fifo_size = 16, .tx_loadsz = 16, - .fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, + .fcr = UART_FCR_ENABLE_FIFO, + //.fcr = UART_FCR_ENABLE_FIFO | UART_FCR_R_TRIG_10, .flags = UART_CAP_FIFO, }, [PORT_CIRRUS] = { @@ -1646,25 +1648,6 @@ static int serial8250_startup(struct uar serial8250_set_mctrl(&up->port, up->port.mctrl); - /* - * Do a quick test to see if we receive an - * interrupt when we enable the TX irq. - */ - serial_outp(up, UART_IER, UART_IER_THRI); - lsr = serial_in(up, UART_LSR); - iir = serial_in(up, UART_IIR); - serial_outp(up, UART_IER, 0); - - if (lsr & UART_LSR_TEMT && iir & UART_IIR_NO_INT) { - if (!(up->bugs & UART_BUG_TXEN)) { - up->bugs |= UART_BUG_TXEN; - pr_debug("ttyS%d - enabling bad tx status workarounds\n", - port->line); - } - } else { - up->bugs &= ~UART_BUG_TXEN; - } - spin_unlock_irqrestore(&up->port.lock, flags); /*
_______________________________________________ Davinci-linux-open-source mailing list Davinci-linux-open-source@linux.davincidsp.com http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source