[U-Boot] [PATCH 4/4] armv8/ls1043aqds: Initizlize NS16550 if enalbed LPUART

Bin Meng bmeng.cn at gmail.com
Tue Jan 19 11:42:21 CET 2016


Hi Wenbin,

On Tue, Jan 19, 2016 at 6:21 PM, Wenbin Song <wenbin.song at nxp.com> wrote:
> Hi: Bin,
>       Because we use the ns16550  as the early console when booting  kernel , and the earlycon driver on kernel  cannot initialize port->uartclk rightly, So if we want to use it, we must initialize ns16550 on uboot, and use the bootargs  as follow :
>       "console=ttyS0,115200 root=/dev/ram0  earlycon=uart8250,0x21c0500 "
>

I understand this. My question was: U-Boot was booted using LPUART as
its serial console, why do you bother loading a kernel with another
serial port as the early console?

> int __init early_serial8250_setup(struct earlycon_device *device,
>                                          const char *options)
> {
>         if (!(device->port.membase || device->port.iobase))
>                 return -ENODEV;
>
>         if (!device->baud) {
>                 struct uart_port *port = &device->port;
>                 unsigned int ier;
>
>                 /* assume the device was initialized, only mask interrupts */
>                 ier = serial8250_early_in(port, UART_IER);
>                 serial8250_early_out(port, UART_IER, ier & UART_IER_UUE);
>         } else
>                 init_port(device);
>
>         device->con->write = early_serial8250_write;
>         return 0;
> }
>

[snip]

Regards,
Bin


More information about the U-Boot mailing list