serial: 8250_early: Setup divider when uartclk is passed
authorMichal Simek <michal.simek@xilinx.com>
Mon, 23 Apr 2018 09:18:11 +0000 (11:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 25 Apr 2018 12:56:12 +0000 (14:56 +0200)
device->baud is always non zero value because it is checked already in
early_serial8250_setup() before init_port is called.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/8250/8250_early.c

index ae6a256..5cd8c36 100644 (file)
@@ -122,7 +122,7 @@ static void __init init_port(struct earlycon_device *device)
        serial8250_early_out(port, UART_FCR, 0);        /* no fifo */
        serial8250_early_out(port, UART_MCR, 0x3);      /* DTR + RTS */
 
-       if (port->uartclk && device->baud) {
+       if (port->uartclk) {
                divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud);
                c = serial8250_early_in(port, UART_LCR);
                serial8250_early_out(port, UART_LCR, c | UART_LCR_DLAB);