logo       

Xscale UART detection false positive: msg#00019

linux.serial

Subject: Xscale UART detection false positive

The following code from autoconfig_16550a() incorrectly determines that
the UARTS in the Tundra TSI108 are Xscale UARTS and misconfigures them.

> /*
> * Try writing and reading the UART_IER_UUE bit (b6).
> * If it works, this is probably one of the Xscale platform's
> * internal UARTs.
> * We're going to explicitly set the UUE bit to 0 before
> * trying to write and read a 1 just to make sure it's not
> * already a 1 and maybe locked there before we even start start.
> */
> iersave = serial_in(up, UART_IER);
> serial_outp(up, UART_IER, iersave & ~UART_IER_UUE);
> if (!(serial_in(up, UART_IER) & UART_IER_UUE)) {
> /*
> * OK it's in a known zero state, try writing and reading
> * without disturbing the current state of the other bits.
> */
> serial_outp(up, UART_IER, iersave | UART_IER_UUE);
> if (serial_in(up, UART_IER) & UART_IER_UUE) {
> /*
> * It's an Xscale.
> * We'll leave the UART_IER_UUE bit set to 1 (enabled).
> */
> DEBUG_AUTOCONF("Xscale ");
> up->port.type = PORT_XSCALE;
> up->capabilities |= UART_CAP_UUE;
> return;
> }
> } else {
> /*
> * If we got here we couldn't force the IER_UUE bit to 0.
> * Log it and continue.
> */
> DEBUG_AUTOCONF("Couldn't force IER_UUE to 0 ");
> }
> serial_outp(up, UART_IER, iersave);

Right now, I work around this by ifdeffing out that code.
Any ideas on alternative methods for autodetecting Xscale UARTS?

Dale Farnsworth
-
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



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise