ath79/mikrotik: use routerbootpart partitions
[oweals/openwrt.git] / target / linux / layerscape / patches-5.4 / 819-uart-0003-tty-serial-fsl_lpuart-add-magic-SysRq-support.patch
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
5
6 Add magic SysRq key support.
7
8 Signed-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 @@ -920,7 +920,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;