1 From 72f84f6598168f11c9c5d17ccbd9a5ce66868cbb Mon Sep 17 00:00:00 2001
2 From: Andreas Larsson <andreas@gaisler.com>
3 Date: Tue, 22 Jun 2021 18:25:12 +0200
4 Subject: [PATCH 17/32] tty/serial/apbuart: Clear error and break bits at probe
7 Otherwise old bits laying around can trigger things like an old break
8 bit triggering sysrq at first intput even though the break condition was
11 Signed-off-by: Andreas Larsson <andreas@gaisler.com>
13 drivers/tty/serial/apbuart.c | 3 +++
14 1 file changed, 3 insertions(+)
16 diff --git a/drivers/tty/serial/apbuart.c b/drivers/tty/serial/apbuart.c
17 index a22c48e5d217..385d58c2cf04 100644
18 --- a/drivers/tty/serial/apbuart.c
19 +++ b/drivers/tty/serial/apbuart.c
20 @@ -564,6 +564,9 @@ static int apbuart_probe(struct platform_device *op)
22 apbuart_flush_fifo((struct uart_port *) port);
24 + /* Clear any errors or breaks */
25 + UART_PUT_STATUS(port, 0);
27 printk(KERN_INFO "grlib-apbuart at 0x%llx, irq %d\n",
28 (unsigned long long) port->mapbase, port->irq);