Merge 5.18-rc5 into tty-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 May 2022 12:56:14 +0000 (14:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 May 2022 12:56:14 +0000 (14:56 +0200)
We need the tty/serial fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1  2 
MAINTAINERS
drivers/tty/n_gsm.c
drivers/tty/serial/8250/8250_pci.c
drivers/tty/serial/8250/8250_port.c
drivers/tty/serial/amba-pl011.c
drivers/tty/serial/imx.c
drivers/tty/serial/sc16is7xx.c

diff --cc MAINTAINERS
Simple merge
Simple merge
Simple merge
@@@ -3356,38 -3329,9 +3356,38 @@@ static void serial8250_console_restore(
  
        serial8250_set_divisor(port, baud, quot, frac);
        serial_port_out(port, UART_LCR, up->lcr);
-       serial8250_out_MCR(up, UART_MCR_DTR | UART_MCR_RTS);
+       serial8250_out_MCR(up, up->mcr | UART_MCR_DTR | UART_MCR_RTS);
  }
  
 +/*
 + * Print a string to the serial port using the device FIFO
 + *
 + * It sends fifosize bytes and then waits for the fifo
 + * to get empty.
 + */
 +static void serial8250_console_fifo_write(struct uart_8250_port *up,
 +                                        const char *s, unsigned int count)
 +{
 +      int i;
 +      const char *end = s + count;
 +      unsigned int fifosize = up->tx_loadsz;
 +      bool cr_sent = false;
 +
 +      while (s != end) {
 +              wait_for_lsr(up, UART_LSR_THRE);
 +
 +              for (i = 0; i < fifosize && s != end; ++i) {
 +                      if (*s == '\n' && !cr_sent) {
 +                              serial_out(up, UART_TX, '\r');
 +                              cr_sent = true;
 +                      } else {
 +                              serial_out(up, UART_TX, *s++);
 +                              cr_sent = false;
 +                      }
 +              }
 +      }
 +}
 +
  /*
   *    Print a string to the serial port trying not to disturb
   *    any possible real use of the port...
Simple merge
Simple merge
Simple merge