2022-03-27 10:54:03 +00:00
|
|
|
--- a/drivers/tty/serial/8250/8250.h
|
|
|
|
+++ b/drivers/tty/serial/8250/8250.h
|
2022-08-22 12:02:36 +00:00
|
|
|
@@ -85,6 +85,7 @@ struct serial8250_config {
|
2022-03-27 10:54:03 +00:00
|
|
|
#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
|
2023-05-12 16:33:18 +00:00
|
|
|
@@ -289,7 +289,7 @@ static const struct serial8250_config ua
|
2022-03-27 10:54:03 +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",
|
2024-04-13 17:22:41 +00:00
|
|
|
@@ -2746,6 +2746,11 @@ serial8250_do_set_termios(struct uart_po
|
2022-03-27 10:54:03 +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 ||
|