From e2ceb8dd93ace2e82fe136e1900b6830ac11049d Mon Sep 17 00:00:00 2001 From: John Crispin Date: Fri, 3 Apr 2020 11:52:35 +0200 Subject: mediatek: more v5.4 fixes These are all backports and/or on their way upstream. Signed-off-by: John Crispin --- .../patches-5.4/0900-bt-mtk-serial-fix.patch | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch (limited to 'target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch') diff --git a/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch new file mode 100644 index 0000000000..6d4cce276b --- /dev/null +++ b/target/linux/mediatek/patches-5.4/0900-bt-mtk-serial-fix.patch @@ -0,0 +1,33 @@ +--- a/drivers/tty/serial/8250/8250.h ++++ b/drivers/tty/serial/8250/8250.h +@@ -80,6 +80,7 @@ struct serial8250_config { + #define UART_CAP_MINI (1 << 17) /* Mini UART on BCM283X family lacks: + * STOP PARITY EPAR SPAR WLEN5 WLEN6 + */ ++#define UART_CAP_NMOD (1 << 18) /* UART doesn't do termios */ + + #define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */ + #define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */ +--- a/drivers/tty/serial/8250/8250_port.c ++++ b/drivers/tty/serial/8250/8250_port.c +@@ -297,7 +297,7 @@ static const struct serial8250_config ua + .tx_loadsz = 16, + .fcr = UART_FCR_ENABLE_FIFO | + UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT, +- .flags = UART_CAP_FIFO, ++ .flags = UART_CAP_FIFO | UART_CAP_NMOD, + }, + [PORT_NPCM] = { + .name = "Nuvoton 16550", +@@ -2648,6 +2648,11 @@ serial8250_do_set_termios(struct uart_po + unsigned long flags; + unsigned int baud, quot, frac = 0; + ++ if (up->capabilities & UART_CAP_NMOD) { ++ termios->c_cflag = 0; ++ return; ++ } ++ + if (up->capabilities & UART_CAP_MINI) { + termios->c_cflag &= ~(CSTOPB | PARENB | PARODD | CMSPAR); + if ((termios->c_cflag & CSIZE) == CS5 || -- cgit v1.2.3