1 From 74d7e639cce7ae95cacd948dcf5ed3b28c3fff5c Mon Sep 17 00:00:00 2001
2 From: Fugang Duan <fugang.duan@nxp.com>
3 Date: Mon, 28 Jan 2019 10:27:27 +0800
4 Subject: [PATCH] tty: serial: fsl_lpuart: add magic SysRq support
6 Add magic SysRq key support.
8 Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
10 drivers/tty/serial/fsl_lpuart.c | 7 ++++++-
11 1 file changed, 6 insertions(+), 1 deletion(-)
13 --- a/drivers/tty/serial/fsl_lpuart.c
14 +++ b/drivers/tty/serial/fsl_lpuart.c
15 @@ -918,7 +918,12 @@ static void lpuart32_rxint(struct lpuart
17 sr = lpuart32_read(&sport->port, UARTSTAT);
18 rx = lpuart32_read(&sport->port, UARTDATA);
21 + if ((sr & UARTSTAT_FE) && (rx & UARTDATA_FRETSC) &&
22 + !(rx & UARTDATA_MASK)) {
23 + if (uart_handle_break(&sport->port))
27 if (uart_handle_sysrq_char(&sport->port, (unsigned char)rx))