summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/fsl_lpuart.c
diff options
context:
space:
mode:
authorFugang Duan <fugang.duan@nxp.com>2019-01-28 10:27:27 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:45:22 +0800
commitf285ec299e8b3bf077642527efb6f17d6d1ed8e4 (patch)
tree67108599c299ecf4102be032ee3965912766c2a3 /drivers/tty/serial/fsl_lpuart.c
parent89d0add021de18685ce4ade70dead05fac535935 (diff)
tty: serial: fsl_lpuart: add magic SysRq support
Add magic SysRq key support. Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'drivers/tty/serial/fsl_lpuart.c')
-rw-r--r--drivers/tty/serial/fsl_lpuart.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 6d3a09103820..28d4ef9805fe 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -919,7 +919,12 @@ static void lpuart32_rxint(struct lpuart_port *sport)
*/
sr = lpuart32_read(&sport->port, UARTSTAT);
rx = lpuart32_read(&sport->port, UARTDATA);
- rx &= 0x3ff;
+
+ if ((sr & UARTSTAT_FE) && (rx & UARTDATA_FRETSC) &&
+ !(rx & UARTDATA_MASK)) {
+ if (uart_handle_break(&sport->port))
+ continue;
+ }
if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx))
continue;