From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 3/7] tty/serial: convert 8250 to generic earlycon
Date: Wed, 11 Jun 2014 12:58:27 -0500 [thread overview]
Message-ID: <539898C3.8090903@gmail.com> (raw)
In-Reply-To: <CA+8MBbLooWm9xys+gYa5uL1eVTH-qzaR+RaZgsrqV-8XkqGadQ@mail.gmail.com>
On 06/10/2014 03:52 PM, Tony Luck wrote:
> On Mon, Jun 9, 2014 at 4:18 PM, Rob Herring <robherring2@gmail.com> wrote:
>> It should do auto detect of the baud-rate if it is not specified which
>> for 8250 is just reading the baud-rate divider and calculating the
>> baud-rate using the uart clock. It should just reprogram the divider
>> with the same divider value. I don't see anything obvious why this
>> would have broken.
>
> Something very weird is happening. Output is good so long as I put the
> trailing ",115200" on the command line.
>
> But I made early_serial8250_setup() printk() the return value it got
> from probe_baud() - in case is was somehow getting 115201 or some
> other silly value ... nope. Exactly 115200.
>
> I also can't explain why the "noise" comes and goes a dozen
> times during boot,
>
> Does some other place in the kernel look at the "uart..." command
> line argument?
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,
};
next prev parent reply other threads:[~2014-06-11 17:58 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-18 22:19 [PATCH v2 0/7] Generic serial earlycon Rob Herring
2014-04-18 22:19 ` [PATCH v2 1/7] x86: move FIX_EARLYCON_MEM kconfig into x86 Rob Herring
2014-04-18 22:19 ` [PATCH v2 2/7] tty/serial: add generic serial earlycon Rob Herring
2014-04-18 22:19 ` [PATCH v2 3/7] tty/serial: convert 8250 to generic earlycon Rob Herring
2014-04-26 6:19 ` Yinghai Lu
2014-04-28 23:20 ` Rob Herring
2014-05-03 22:07 ` Greg Kroah-Hartman
2014-05-03 22:16 ` Greg Kroah-Hartman
2014-06-09 22:25 ` Tony Luck
2014-06-09 22:35 ` Tony Luck
2014-06-09 23:18 ` Rob Herring
2014-06-10 20:52 ` Tony Luck
2014-06-10 22:38 ` Rob Herring
2014-06-11 17:58 ` Rob Herring [this message]
2014-06-11 22:20 ` Tony Luck
2014-06-11 23:44 ` Yinghai Lu
2014-06-09 22:36 ` Rob Herring
2014-04-26 6:29 ` Yinghai Lu
2014-04-28 23:24 ` Rob Herring
2014-04-29 2:56 ` Yinghai Lu
2014-04-29 15:16 ` Rob Herring
2014-04-29 18:22 ` Yinghai Lu
2014-04-29 20:41 ` Rob Herring
2014-04-29 22:00 ` Yinghai Lu
2014-04-18 22:19 ` [PATCH v2 4/7] tty/serial: pl011: add generic earlycon support Rob Herring
2014-04-18 22:19 ` [PATCH v2 5/7] tty/serial: add arm/arm64 semihosting earlycon Rob Herring
2014-04-18 22:19 ` [PATCH v2 6/7] arm64: enable FIX_EARLYCON_MEM kconfig Rob Herring
2014-04-18 22:20 ` [PATCH v2 7/7] arm64: remove arch specific earlyprintk Rob Herring
2014-04-29 11:09 ` [PATCH v2 0/7] Generic serial earlycon Catalin Marinas
2014-04-29 15:12 ` Rob Herring
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=539898C3.8090903@gmail.com \
--to=robherring2@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).