1 From ee6c9d41de084b2cefd90e5e0c9f30a35f6d3967 Mon Sep 17 00:00:00 2001
2 From: Jonas Gorski <jonas.gorski@gmail.com>
3 Date: Sun, 29 Oct 2017 15:50:42 +0100
4 Subject: [PATCH RFC 3/3] MIPS: AR7: ensure the port type's FCR value is used
6 Since commit aef9a7bd9b67 ("serial/uart/8250: Add tunable RX interrupt
7 trigger I/F of FIFO buffers"), the port's default FCR value isn't used
8 in serial8250_do_set_termios anymore, but copied over once in
9 serial8250_config_port and then modified as needed.
11 Unfortunately, serial8250_config_port will never be called if the port
12 is shared between kernel and userspace, and the port's flag doesn't have
13 UPF_BOOT_AUTOCONF, which would trigger a serial8250_config_port as well.
15 This causes garbled output from userspace:
17 [ 5.220000] random: procd urandom read with 49 bits of entropy available
21 Fix this by forcing it to be configured on boot, resulting in the
24 [ 5.250000] random: procd urandom read with 50 bits of entropy available
25 Press the [f] key and hit [enter] to enter failsafe mode
26 Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
28 Fixes: aef9a7bd9b67 ("serial/uart/8250: Add tunable RX interrupt trigger I/F of FIFO buffers")
29 Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
31 I'm not sure if this is just AR7's issue, or if this points to a general
32 issue for UARTs used as kernel console and login console with the "fixed"
35 arch/mips/ar7/platform.c | 2 +-
36 1 file changed, 1 insertion(+), 1 deletion(-)
38 --- a/arch/mips/ar7/platform.c
39 +++ b/arch/mips/ar7/platform.c
40 @@ -581,7 +581,7 @@ static int __init ar7_register_uarts(voi
41 uart_port.type = PORT_AR7;
42 uart_port.uartclk = clk_get_rate(bus_clk) / 2;
43 uart_port.iotype = UPIO_MEM32;
44 - uart_port.flags = UPF_FIXED_TYPE;
45 + uart_port.flags = UPF_FIXED_TYPE | UPF_BOOT_AUTOCONF;
46 uart_port.regshift = 2;