public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <Yinghai.Lu@Sun.COM>
To: Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Alex Chiang <achiang@hp.com>,
	akpm@linux-foundation.org, ak@suse.de,
	Gerd Hoffmann <kraxel@redhat.com>,
	rmk@arm.linux.org.uk, Andy Whitcroft <apw@shadowen.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH] serial : convert early_uart to earlycon for 8250 fix 3 alias
Date: Thu, 21 Jun 2007 10:42:54 -0700	[thread overview]
Message-ID: <200706211042.54917.yinghai.lu@sun.com> (raw)
In-Reply-To: <200706120955.44097.yinghai.lu@sun.com>

[PATCH] serial : convert early_uart to earlycon for 8250 fix 3 alias

make the console=uart,io,0x3f8,9600n8 like console=uart8250,io,0x3f8,9600
suggested by Andy Whitcroft.
 
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

--- a/Documentation/kernel-parameters.txt	2007-06-21 10:12:48.000000000 -0700
+++ b/Documentation/kernel-parameters.txt	2007-06-21 10:13:43.000000000 -0700
@@ -467,16 +467,16 @@
 			Documentation/networking/netconsole.txt for an
 			alternative.
 
-		uart8250,io,<addr>[,options]
-		uart8250,mmio,<addr>[,options]
+		uart[8250],io,<addr>[,options]
+		uart[8250],mmio,<addr>[,options]
 			Start an early, polled-mode console on the 8250/16550
 			UART at the specified I/O port or MMIO address,
 			switching to the matching ttyS device later.  The
 			options are the same as for ttyS, above.
 
 	earlycon=	[KNL] Output early console device and options.
-		uart8250,io,<addr>[,options]
-		uart8250,mmio,<addr>[,options]
+		uart[8250],io,<addr>[,options]
+		uart[8250],mmio,<addr>[,options]
 			Start an early, polled-mode console on the 8250/16550
 			UART at the specified I/O port or MMIO address.
 			The options are the same as for ttyS, above.
--- a/drivers/serial/8250_early.c	2007-06-21 10:04:25.000000000 -0700
+++ b/drivers/serial/8250_early.c	2007-06-21 10:12:08.000000000 -0700
@@ -210,8 +210,11 @@
 	int err;
 
 	options = strstr(cmdline, "uart8250,");
-	if (!options)
-		return 0;
+	if (!options) {
+		options = strstr(cmdline, "uart,");
+		if (!options)
+			return 0;
+	}
 
 	options = strchr(cmdline, ',') + 1;
 	if ((err = early_serial8250_setup(options)) < 0)
@@ -227,6 +230,7 @@
 	struct early_serial8250_device *device = &early_device;
 	struct uart_port *port = &device->port;
 	int line;
+	int ret;
 
 	if (!device->port.membase && !device->port.iobase)
 		return -ENODEV;
@@ -235,8 +239,13 @@
 	if (line < 0)
 		return -ENODEV;
 
-	return update_console_cmdline("uart", 8250,
+	ret = update_console_cmdline("uart", 8250,
+			     "ttyS", line, device->options);
+	if (ret < 0)
+		ret = update_console_cmdline("uart", 0,
 				     "ttyS", line, device->options);
+
+	return ret;
 }
 
 early_param("earlycon", setup_early_serial8250_console);

       reply	other threads:[~2007-06-21 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200706010002.l5102LN5031209@shell0.pdx.osdl.net>
     [not found] ` <466EC86C.6000601@sun.com>
     [not found]   ` <200706120955.44097.yinghai.lu@sun.com>
2007-06-21 17:42     ` Yinghai Lu [this message]
2007-06-22 11:58       ` [PATCH] serial : convert early_uart to earlycon for 8250 fix 3 alias Andy Whitcroft

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=200706211042.54917.yinghai.lu@sun.com \
    --to=yinghai.lu@sun.com \
    --cc=achiang@hp.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=apw@shadowen.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=kraxel@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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