]> git.hungrycats.org Git - linux/commitdiff
[SERIAL] Make the Startech UART detection 'more correct'
authorTom Rini <trini@org.rmk.(none)>
Mon, 29 Sep 2003 17:52:40 +0000 (18:52 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Mon, 29 Sep 2003 17:52:40 +0000 (18:52 +0100)
drivers/serial/8250.c

index 88deb3a2605bdffaaa8b8830e094f5388f36b823..7d0479c472ca466e9ff0a783687ceaa10a5a21c1 100644 (file)
@@ -469,8 +469,14 @@ static void autoconfig_16550a(struct uart_8250_port *up)
         */
        serial_outp(up, UART_LCR, UART_LCR_DLAB);
        if (serial_in(up, UART_EFR) == 0) {
-               DEBUG_AUTOCONF("EFRv1 ");
-               up->port.type = PORT_16650;
+               serial_outp(up, UART_EFR, 0xA8);
+               if (serial_in(up, UART_EFR) != 0) {
+                       DEBUG_AUTOCONF("EFRv1 ");
+                       up->port.type = PORT_16650;
+               } else {
+                       DEBUG_AUTOCONF("Motorola 8xxx DUART ");
+               }
+               serial_outp(up, UART_EFR, 0);
                return;
        }