diff options
author | Felix Fietkau <nbd@nbd.name> | 2022-03-27 12:54:03 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2022-03-27 12:55:53 +0200 |
commit | ade563ba84496406243b3699a27b3de7e08399e7 (patch) | |
tree | 6830600d257c707a0599041b779b7b3239dadf17 /target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch | |
parent | a92db8abe056bd517ca2cc452786c0325ba6dba7 (diff) | |
download | upstream-ade563ba84496406243b3699a27b3de7e08399e7.tar.gz upstream-ade563ba84496406243b3699a27b3de7e08399e7.tar.bz2 upstream-ade563ba84496406243b3699a27b3de7e08399e7.zip |
mediatek: add patches for 5.15 and kernel config for mt7622
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch')
-rw-r--r-- | target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch new file mode 100644 index 0000000000..f5e027ae09 --- /dev/null +++ b/target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch @@ -0,0 +1,33 @@ +--- a/drivers/tty/serial/8250/8250.h ++++ b/drivers/tty/serial/8250/8250.h +@@ -83,6 +83,7 @@ struct serial8250_config { + #define UART_CAP_MINI BIT(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 BIT(0) /* UART has buggy quot LSB */ + #define UART_BUG_TXEN BIT(1) /* UART has buggy TX IIR status */ +--- a/drivers/tty/serial/8250/8250_port.c ++++ b/drivers/tty/serial/8250/8250_port.c +@@ -288,7 +288,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", +@@ -2746,6 +2746,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 || |