2023-06-27 00:06:47 +00:00
|
|
|
--- a/drivers/tty/serial/8250/8250.h
|
|
|
|
+++ b/drivers/tty/serial/8250/8250.h
|
2023-06-27 00:15:55 +00:00
|
|
|
@@ -86,6 +86,7 @@ struct serial8250_config {
|
2023-06-27 00:06:47 +00:00
|
|
|
* STOP PARITY EPAR SPAR WLEN5 WLEN6
|
|
|
|
*/
|
2023-06-27 00:15:55 +00:00
|
|
|
#define UART_CAP_NOTEMT BIT(18) /* UART without interrupt on TEMT available */
|
|
|
|
+#define UART_CAP_NMOD BIT(19) /* UART doesn't do termios */
|
2023-06-27 00:06:47 +00:00
|
|
|
|
|
|
|
#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
|
2023-06-27 00:15:55 +00:00
|
|
|
@@ -287,7 +287,7 @@ static const struct serial8250_config ua
|
2023-06-27 00:06:47 +00:00
|
|
|
.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",
|
2023-10-06 17:59:35 +00:00
|
|
|
@@ -2773,6 +2773,11 @@ serial8250_do_set_termios(struct uart_po
|
2023-06-27 00:06:47 +00:00
|
|
|
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 ||
|