diff options
author | Michal Simek | 2018-04-23 10:55:21 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2018-04-23 11:12:22 +0200 |
commit | 66dd99c2033684169f04068f66c7f83f7da229b8 (patch) | |
tree | 97348ecd1134a6e2f5afb66c5540981266d2f60c /drivers/tty | |
parent | 903f9db10f18f735e62ba447147b6c434b6af003 (diff) |
tty: serial: xuartps: Setup early console when uartclk is also passed
Baudrate calculation depends on requested baudrate and uart clock.
This patch is checking that uartclk is also passed.
The same logic is used 8250_early.c/init_port function.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/xilinx_uartps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c index abcb4d09a2d8..bd72dd843338 100644 --- a/drivers/tty/serial/xilinx_uartps.c +++ b/drivers/tty/serial/xilinx_uartps.c @@ -1181,7 +1181,7 @@ static int __init cdns_early_console_setup(struct earlycon_device *device, /* only set baud if specified on command line - otherwise * assume it has been initialized by a boot loader. */ - if (device->baud) { + if (port->uartclk && device->baud) { u32 cd = 0, bdiv = 0; u32 mr; int div8; |