mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Josef Whiter <jwhiter@redhat.com>
To: linux-serial@vger.kernel.org
Cc: rmk+serial@arm.linux.org.uk, linux-kernel@vger.kernel.org
Subject: [PATCH] RFE: add io= option to 8250 serial console
Date: Wed, 6 Sep 2006 17:22:37 -0400	[thread overview]
Message-ID: <20060906212236.GC6841@korben.rdu.redhat.com> (raw)

Hello,

This patch is against a recent git clone of Linus's tree.  This patch adds the
ability to set the iobase for the serial port being used when you specify a
serial device for the console on bootup, ie

console=ttyS0,io=0x3f8

this is requested because boxes that use HP's iLo interface will usually
redirect any output to ttyS0 to the iLo interface, which has a certain amount of
latency associated with it.  This option allows users to set the iobase for the
port to the iLo's iobase which removes the need for the bios to do it's
indirection.  This has been tested by myself and HP and it works.  Thank you,

Josef


--- linux-2.6/drivers/serial/8250.c.josef	2006-09-04 11:44:48.000000000 -0400
+++ linux-2.6/drivers/serial/8250.c	2006-09-06 14:22:26.000000000 -0400
@@ -2304,6 +2304,31 @@ static int serial8250_console_setup(stru
 	if (!port->iobase && !port->membase)
 		return -ENODEV;
 
+	/*
+	 * if an io address is specified set the port's iobase to the 
+	 * specified port.  Parses the following option setups
+	 *	console=ttyS0,io=0x3f8
+	 *	console=ttyS0,115200n8,io=0x3f8
+	 *	console=ttyS0,io=0x3f8,115200n8
+	 */
+	if (options) {
+		char *ioptr;
+		unsigned long iobase = 0;
+		if ((ioptr = strstr(options, "io=")) != NULL) {
+			iobase = simple_strtoul(ioptr+3, NULL, 16);
+			if (ioptr == options) {
+				if((ioptr = strstr(options, ",")) != NULL)
+					options = ioptr+1;
+				else
+					options = (char *)0;
+			} else
+				*(ioptr-1) = '\0';
+		}
+
+		if (iobase)
+			port->iobase = iobase;
+	}
+
 	if (options)
 		uart_parse_options(options, &baud, &parity, &bits, &flow);
 

             reply	other threads:[~2006-09-06 21:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-06 21:22 Josef Whiter [this message]
2006-09-06 22:39 ` Russell King

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=20060906212236.GC6841@korben.rdu.redhat.com \
    --to=jwhiter@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=rmk+serial@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

Powered by JetHome