Message ID | 539898C3.8090903@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Jun 11, 2014 at 10:58 AM, Rob Herring <robherring2@gmail.com> wrote: > I think I figured it out. The function > serial8250_find_port_for_earlycon is failing to match 'uart' console to > 'ttyS' console and transfer the options. It was also failing to create > an option string when the baud rate is probed. Can you try out the > below patch? Rob, That works. Thanks for digging deeper into this. Here's a tag for when you push that patch: Reported-and-tested-by: Tony Luck <tony.luck@intel.com> -Tony
On Wed, Jun 11, 2014 at 10:58 AM, Rob Herring <robherring2@gmail.com> wrote: > On 06/10/2014 03:52 PM, Tony Luck wrote: > I think I figured it out. The function > serial8250_find_port_for_earlycon is failing to match 'uart' console to > 'ttyS' console and transfer the options. It was also failing to create > an option string when the baud rate is probed. Can you try out the > below patch? > > Rob > > 8<------------------------------------------------------------------- > diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c > index cfef801..4858b8a 100644 > --- a/drivers/tty/serial/8250/8250_early.c > +++ b/drivers/tty/serial/8250/8250_early.c > @@ -144,8 +144,11 @@ static int __init early_serial8250_setup(struct earlycon_device *device, > if (!(device->port.membase || device->port.iobase)) > return 0; > > - if (!device->baud) > + if (!device->baud) { > device->baud = probe_baud(&device->port); > + snprintf(device->options, sizeof(device->options), "%u", > + device->baud); > + } > > init_port(device); > > diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c > index 5131b5e..d20e6d8 100644 > --- a/drivers/tty/serial/earlycon.c > +++ b/drivers/tty/serial/earlycon.c > @@ -25,7 +25,7 @@ > #include <asm/serial.h> > > static struct console early_con = { > - .name = "earlycon", > + .name = "uart", > .flags = CON_PRINTBUFFER | CON_BOOT, > .index = -1, > }; > Yes, that is right fix. For the name in early_con with "uart", please add some comments that serial8250_find_port_for_earlycon() will look for "uart"... Thanks Yinghai
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c index cfef801..4858b8a 100644 --- a/drivers/tty/serial/8250/8250_early.c +++ b/drivers/tty/serial/8250/8250_early.c @@ -144,8 +144,11 @@ static int __init early_serial8250_setup(struct earlycon_device *device, if (!(device->port.membase || device->port.iobase)) return 0; - if (!device->baud) + if (!device->baud) { device->baud = probe_baud(&device->port); + snprintf(device->options, sizeof(device->options), "%u", + device->baud); + } init_port(device); diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c index 5131b5e..d20e6d8 100644 --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c @@ -25,7 +25,7 @@ #include <asm/serial.h> static struct console early_con = { - .name = "earlycon", + .name = "uart", .flags = CON_PRINTBUFFER | CON_BOOT, .index = -1, };