aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/xilinx_uartps.c
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-04-23 10:55:21 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 11:12:22 +0200
commit66dd99c2033684169f04068f66c7f83f7da229b8 (patch)
tree97348ecd1134a6e2f5afb66c5540981266d2f60c /drivers/tty/serial/xilinx_uartps.c
parenttty: Don't call panic() at tty_ldisc_init() (diff)
downloadlinux-dev-66dd99c2033684169f04068f66c7f83f7da229b8.tar.xz
linux-dev-66dd99c2033684169f04068f66c7f83f7da229b8.zip
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/serial/xilinx_uartps.c')
-rw-r--r--drivers/tty/serial/xilinx_uartps.c2
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;