aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Simek <michal.simek@xilinx.com>2018-04-23 04:55:21 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-04-23 05:12:22 -0400
commit66dd99c2033684169f04068f66c7f83f7da229b8 (patch)
tree97348ecd1134a6e2f5afb66c5540981266d2f60c
parent903f9db10f18f735e62ba447147b6c434b6af003 (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>
-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,
1181 /* only set baud if specified on command line - otherwise 1181 /* only set baud if specified on command line - otherwise
1182 * assume it has been initialized by a boot loader. 1182 * assume it has been initialized by a boot loader.
1183 */ 1183 */
1184 if (device->baud) { 1184 if (port->uartclk && device->baud) {
1185 u32 cd = 0, bdiv = 0; 1185 u32 cd = 0, bdiv = 0;
1186 u32 mr; 1186 u32 mr;
1187 int div8; 1187 int div8;