Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: 8250_early: Setup divider when uartclk is passed

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>

authored by

Michal Simek and committed by
Greg Kroah-Hartman
700ad553 c6964e93

+1 -1
+1 -1
drivers/tty/serial/8250/8250_early.c
··· 122 122 serial8250_early_out(port, UART_FCR, 0); /* no fifo */ 123 123 serial8250_early_out(port, UART_MCR, 0x3); /* DTR + RTS */ 124 124 125 - if (port->uartclk && device->baud) { 125 + if (port->uartclk) { 126 126 divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * device->baud); 127 127 c = serial8250_early_in(port, UART_LCR); 128 128 serial8250_early_out(port, UART_LCR, c | UART_LCR_DLAB);