diff --git a/linux-5.10/rk3568_patch/kernel.patch b/linux-5.10/rk3568_patch/kernel.patch index f9e165016e9f1c205cc6e6a7adcef30b1a741727..cdb4eafc2a6be3f1b40ed62466246d8ed795df4d 100644 --- a/linux-5.10/rk3568_patch/kernel.patch +++ b/linux-5.10/rk3568_patch/kernel.patch @@ -1580730,7 +1580730,7 @@ diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_ index 110a19c51..dd41c694c 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c -@@ -1567,8 +1567,13 @@ static inline void __start_tx(struct uart_port *port) +@@ -1538,8 +1538,13 @@ static inline void __start_tx(struct uart_port *port) { struct uart_8250_port *up = up_to_u8250p(port); @@ -1580744,7 +1580744,7 @@ index 110a19c51..dd41c694c 100644 if (serial8250_set_THRI(up)) { if (up->bugs & UART_BUG_TXEN) { -@@ -1888,6 +1893,12 @@ EXPORT_SYMBOL_GPL(serial8250_modem_status); +@@ -1869,6 +1874,12 @@ EXPORT_SYMBOL_GPL(serial8250_modem_status); static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir) { @@ -1580755,9 +1580755,9 @@ index 110a19c51..dd41c694c 100644 + return up->dma->rx_dma(up); +#else switch (iir & 0x3f) { - case UART_IIR_RX_TIMEOUT: - serial8250_rx_dma_flush(up); -@@ -1896,6 +1907,7 @@ static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir) + case UART_IIR_RDI: + if (!up->dma->rx_running) +@@ -1880,6 +1891,7 @@ static bool handle_rx_dma(struct uart_8250_port *up, unsigned int iir) return true; } return up->dma->rx_dma(up); @@ -1580765,17 +1580765,17 @@ index 110a19c51..dd41c694c 100644 } /* -@@ -1906,7 +1918,9 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) - unsigned char status; +@@ -1891,7 +1903,9 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) unsigned long flags; struct uart_8250_port *up = up_to_u8250p(port); + struct tty_port *tport = &port->state->port; +#ifndef CONFIG_ARCH_ROCKCHIP bool skip_rx = false; +#endif if (iir & UART_IIR_NO_INT) return 0; -@@ -1915,6 +1929,17 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) +@@ -1900,6 +1914,17 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) status = serial_port_in(port, UART_LSR); @@ -1580793,7 +1580793,7 @@ index 110a19c51..dd41c694c 100644 /* * If port is stopped and there are no error conditions in the * FIFO, then don't drain the FIFO, as this may lead to TTY buffer -@@ -1932,11 +1957,34 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) +@@ -1922,11 +1947,34 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir) if (!up->dma || handle_rx_dma(up, iir)) status = serial8250_rx_chars(up, status); } @@ -1580830,7 +1580830,7 @@ index 110a19c51..dd41c694c 100644 uart_unlock_and_check_sysrq(port, flags); return 1; } -@@ -2412,7 +2460,11 @@ int serial8250_do_startup(struct uart_port *port) +@@ -2400,7 +2448,11 @@ int serial8250_do_startup(struct uart_port *port) if (uart_console(port)) msg = "forbid DMA for kernel console"; else if (serial8250_request_dma(up)) @@ -1580842,7 +1580842,7 @@ index 110a19c51..dd41c694c 100644 if (msg) { dev_warn_ratelimited(port->dev, "%s\n", msg); up->dma = NULL; -@@ -2606,6 +2658,10 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, +@@ -2594,6 +2646,10 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, { struct uart_8250_port *up = up_to_u8250p(port); @@ -1580853,7 +1580853,7 @@ index 110a19c51..dd41c694c 100644 /* Workaround to enable 115200 baud on OMAP1510 internal ports */ if (is_omap1510_8250(up)) { if (baud == 115200) { -@@ -2625,6 +2681,17 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, +@@ -2613,6 +2669,17 @@ void serial8250_do_set_divisor(struct uart_port *port, unsigned int baud, serial_port_out(port, UART_LCR, up->lcr | UART_LCR_DLAB); serial_dl_write(up, quot); @@ -1580871,7 +1580871,7 @@ index 110a19c51..dd41c694c 100644 } EXPORT_SYMBOL_GPL(serial8250_do_set_divisor); -@@ -2804,6 +2871,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2792,6 +2859,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, if ((termios->c_cflag & CREAD) == 0) port->ignore_status_mask |= UART_LSR_DR; @@ -1580879,7 +1580879,7 @@ index 110a19c51..dd41c694c 100644 /* * CTS flow control flag and modem status interrupts */ -@@ -2817,6 +2885,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2805,6 +2873,7 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, up->ier |= UART_IER_RTOIE; serial_port_out(port, UART_IER, up->ier); @@ -1580887,7 +1580887,7 @@ index 110a19c51..dd41c694c 100644 if (up->capabilities & UART_CAP_EFR) { unsigned char efr = 0; -@@ -2835,16 +2904,25 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2823,16 +2892,25 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, UART_EFR, efr); } @@ -1580915,7 +1580915,7 @@ index 110a19c51..dd41c694c 100644 if (port->type != PORT_16750) { /* emulated UARTs (Lucent Venus 167x) need two steps */ if (up->fcr & UART_FCR_ENABLE_FIFO) -@@ -2852,6 +2930,23 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, +@@ -2840,6 +2918,23 @@ serial8250_do_set_termios(struct uart_port *port, struct ktermios *termios, serial_port_out(port, UART_FCR, up->fcr); /* set fcr */ } serial8250_set_mctrl(port, port->mctrl);