diff options
author | Alexander Shiyan <shc_work@mail.ru> | 2013-01-21 10:38:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-21 16:56:46 -0500 |
commit | f548b96de684c86c72cd7ba019c03a7afe94fd53 (patch) | |
tree | 3e00af206200172b911ccc8c7b8294230b52a0ad /drivers/tty/serial/sccnxp.c | |
parent | c098020d0368ded1c6ba8d7b612feffe067509a6 (diff) |
serial: sccnxp: Reset break and overrun bits in RX handler
This patch adds a hardware reset the break and overflow bits for
these events. Without resetting the bits they will be reported to
the core every time, when once occur.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sccnxp.c')
-rw-r--r-- | drivers/tty/serial/sccnxp.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/tty/serial/sccnxp.c b/drivers/tty/serial/sccnxp.c index c5f0e964ec05..c7dec1678f65 100644 --- a/drivers/tty/serial/sccnxp.c +++ b/drivers/tty/serial/sccnxp.c | |||
@@ -305,14 +305,19 @@ static void sccnxp_handle_rx(struct uart_port *port) | |||
305 | if (unlikely(sr)) { | 305 | if (unlikely(sr)) { |
306 | if (sr & SR_BRK) { | 306 | if (sr & SR_BRK) { |
307 | port->icount.brk++; | 307 | port->icount.brk++; |
308 | sccnxp_port_write(port, SCCNXP_CR_REG, | ||
309 | CR_CMD_BREAK_RESET); | ||
308 | if (uart_handle_break(port)) | 310 | if (uart_handle_break(port)) |
309 | continue; | 311 | continue; |
310 | } else if (sr & SR_PE) | 312 | } else if (sr & SR_PE) |
311 | port->icount.parity++; | 313 | port->icount.parity++; |
312 | else if (sr & SR_FE) | 314 | else if (sr & SR_FE) |
313 | port->icount.frame++; | 315 | port->icount.frame++; |
314 | else if (sr & SR_OVR) | 316 | else if (sr & SR_OVR) { |
315 | port->icount.overrun++; | 317 | port->icount.overrun++; |
318 | sccnxp_port_write(port, SCCNXP_CR_REG, | ||
319 | CR_CMD_STATUS_RESET); | ||
320 | } | ||
316 | 321 | ||
317 | sr &= port->read_status_mask; | 322 | sr &= port->read_status_mask; |
318 | if (sr & SR_BRK) | 323 | if (sr & SR_BRK) |