2019-08-02 08:33:28 +00:00
|
|
|
--- a/drivers/tty/serial/8250/8250.h
|
|
|
|
+++ b/drivers/tty/serial/8250/8250.h
|
2019-08-05 10:55:32 +00:00
|
|
|
@@ -80,6 +80,7 @@ struct serial8250_config {
|
2019-08-02 08:33:28 +00:00
|
|
|
#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
|
2019-08-05 10:55:32 +00:00
|
|
|
@@ -297,7 +297,7 @@ static const struct serial8250_config ua
|
2019-08-02 08:33:28 +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",
|
2020-03-09 11:22:15 +00:00
|
|
|
@@ -2648,6 +2648,11 @@ serial8250_do_set_termios(struct uart_po
|
2019-08-02 08:33:28 +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 ||
|