summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sh-sci.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2016-06-24 16:59:16 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-25 09:09:53 -0700
commitfc2af3348a4acea0c28db89a8c84660d0baed4aa (patch)
treeadcb1ec97949d060df4d0874b88c99a61a8f55c6 /drivers/tty/serial/sh-sci.c
parent2768cf42874ae04bdbc33a9c9db96181dc0bbb8d (diff)
downloadop-kernel-dev-fc2af3348a4acea0c28db89a8c84660d0baed4aa.zip
op-kernel-dev-fc2af3348a4acea0c28db89a8c84660d0baed4aa.tar.gz
serial: sh-sci: Clear (H)SCIF timeout and overrun during reset
Add the missing timeout bit definition for (H)SCIF. Clear the timeout and overrun flag bits during UART reset, cfr. the initialization flowchart in the datasheet. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sh-sci.c')
-rw-r--r--drivers/tty/serial/sh-sci.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 408f706..432d9ac 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -2156,6 +2156,11 @@ static void sci_reset(struct uart_port *port)
sci_clear_SCxSR(port,
SCxSR_RDxF_CLEAR(port) & SCxSR_ERROR_CLEAR(port) &
SCxSR_BREAK_CLEAR(port));
+ if (sci_getreg(port, SCLSR)->size) {
+ status = serial_port_in(port, SCLSR);
+ status &= ~(SCLSR_TO | SCLSR_ORER);
+ serial_port_out(port, SCLSR, status);
+ }
}
static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
OpenPOWER on IntegriCloud