Commit c08ef542 authored by vandrove@cz.rmk.(none)'s avatar vandrove@cz.rmk.(none) Committed by Russell King

[SERIAL] Fix 16550A misdetection

Patch from Petr Vandrovec

XScale detection needs access to Interrupt Enable Register on UART.
But this register shares position with high byte clock divisor, and
previous detection steps were leaving clock divisor and not IER
selected, causing misdetection of all 16550A chips as XScale.
 
Fix this by disabling access to clock divisor at the end of previous
detection step, so chip is in same mode after each detection step.
 
Signed-off-by: Petr Vandrovec
parent 726a1180
......@@ -729,6 +729,7 @@ static void autoconfig_16550a(struct uart_8250_port *up)
serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR7_64BYTE);
status2 = serial_in(up, UART_IIR) >> 5;
serial_outp(up, UART_FCR, UART_FCR_ENABLE_FIFO);
serial_outp(up, UART_LCR, 0);
DEBUG_AUTOCONF("iir1=%d iir2=%d ", status1, status2);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment