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