From 3ebe278dccbf53b6fc632db9375f917ae5542aae Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 29 Sep 2003 18:52:40 +0100 Subject: [PATCH] [SERIAL] Make the Startech UART detection 'more correct' --- drivers/serial/8250.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 88deb3a2605bd..7d0479c472ca4 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c @@ -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; } -- 2.53.0