提交 66dd99c2 编写于 作者: M Michal Simek 提交者: Greg Kroah-Hartman

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: NMichal Simek <michal.simek@xilinx.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 903f9db1
...@@ -1181,7 +1181,7 @@ static int __init cdns_early_console_setup(struct earlycon_device *device, ...@@ -1181,7 +1181,7 @@ static int __init cdns_early_console_setup(struct earlycon_device *device,
/* only set baud if specified on command line - otherwise /* only set baud if specified on command line - otherwise
* assume it has been initialized by a boot loader. * assume it has been initialized by a boot loader.
*/ */
if (device->baud) { if (port->uartclk && device->baud) {
u32 cd = 0, bdiv = 0; u32 cd = 0, bdiv = 0;
u32 mr; u32 mr;
int div8; int div8;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册