|
@@ -91,14 +91,22 @@ static int __init ingenic_early_console_setup(struct earlycon_device *dev,
|
|
const char *opt)
|
|
const char *opt)
|
|
{
|
|
{
|
|
struct uart_port *port = &dev->port;
|
|
struct uart_port *port = &dev->port;
|
|
- unsigned int baud, divisor;
|
|
|
|
|
|
+ unsigned int divisor;
|
|
|
|
+ int baud = 115200;
|
|
|
|
|
|
if (!dev->port.membase)
|
|
if (!dev->port.membase)
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
|
|
|
|
|
+ if (opt) {
|
|
|
|
+ unsigned int parity, bits, flow; /* unused for now */
|
|
|
|
+
|
|
|
|
+ uart_parse_options(opt, &baud, &parity, &bits, &flow);
|
|
|
|
+ }
|
|
|
|
+
|
|
ingenic_early_console_setup_clock(dev);
|
|
ingenic_early_console_setup_clock(dev);
|
|
|
|
|
|
- baud = dev->baud ?: 115200;
|
|
|
|
|
|
+ if (dev->baud)
|
|
|
|
+ baud = dev->baud;
|
|
divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * baud);
|
|
divisor = DIV_ROUND_CLOSEST(port->uartclk, 16 * baud);
|
|
|
|
|
|
early_out(port, UART_IER, 0);
|
|
early_out(port, UART_IER, 0);
|