Skip to content

Commit 6c33ff7

Browse files
hpetergregkh
authored andcommitted
serial: 8250_fintek: Fix garbled text for console
Commit fab8a02 ("serial: 8250_fintek: Enable high speed mode on Fintek F81866") introduced support to use high baudrate with Fintek SuperIO UARTs. It'll change clocksources when the UART probed. But when user add kernel parameter "console=ttyS0,115200 console=tty0" to make the UART as console output, the console will output garbled text after the following kernel message. [ 3.681188] Serial: 8250/16550 driver, 32 ports, IRQ sharing enabled The issue is occurs in following step: probe_setup_port() -> fintek_8250_goto_highspeed() It change clocksource from 115200 to 921600 with wrong time, it should change clocksource in set_termios() not in probed. The following 3 patches are implemented change clocksource in fintek_8250_set_termios(). Commit 5817891 ("serial: 8250_fintek: UART dynamic clocksource on Fintek F81216H") Commit 195638b ("serial: 8250_fintek: UART dynamic clocksource on Fintek F81866") Commit 423d911 ("serial: 8250_fintek: Add F81966 Support") Due to the high baud rate had implemented above 3 patches and the patch Commit fab8a02 ("serial: 8250_fintek: Enable high speed mode on Fintek F81866") is bugged, So this patch will remove it. Fixes: fab8a02 ("serial: 8250_fintek: Enable high speed mode on Fintek F81866") Signed-off-by: Ji-Ze Hong (Peter Hong) <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1ee33b1 commit 6c33ff7

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

drivers/tty/serial/8250/8250_fintek.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -290,25 +290,6 @@ static void fintek_8250_set_max_fifo(struct fintek_8250 *pdata)
290290
}
291291
}
292292

293-
static void fintek_8250_goto_highspeed(struct uart_8250_port *uart,
294-
struct fintek_8250 *pdata)
295-
{
296-
sio_write_reg(pdata, LDN, pdata->index);
297-
298-
switch (pdata->pid) {
299-
case CHIP_ID_F81966:
300-
case CHIP_ID_F81866: /* set uart clock for high speed serial mode */
301-
sio_write_mask_reg(pdata, F81866_UART_CLK,
302-
F81866_UART_CLK_MASK,
303-
F81866_UART_CLK_14_769MHZ);
304-
305-
uart->port.uartclk = 921600 * 16;
306-
break;
307-
default: /* leave clock speed untouched */
308-
break;
309-
}
310-
}
311-
312293
static void fintek_8250_set_termios(struct uart_port *port,
313294
struct ktermios *termios,
314295
struct ktermios *old)
@@ -430,7 +411,6 @@ static int probe_setup_port(struct fintek_8250 *pdata,
430411

431412
fintek_8250_set_irq_mode(pdata, level_mode);
432413
fintek_8250_set_max_fifo(pdata);
433-
fintek_8250_goto_highspeed(uart, pdata);
434414

435415
fintek_8250_exit_key(addr[i]);
436416

0 commit comments

Comments
 (0)