* [PATCH] RFE: add io= option to 8250 serial console
@ 2006-09-06 21:22 Josef Whiter
2006-09-06 22:39 ` Russell King
0 siblings, 1 reply; 2+ messages in thread
From: Josef Whiter @ 2006-09-06 21:22 UTC (permalink / raw)
To: linux-serial; +Cc: rmk+serial, linux-kernel
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);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] RFE: add io= option to 8250 serial console
2006-09-06 21:22 [PATCH] RFE: add io= option to 8250 serial console Josef Whiter
@ 2006-09-06 22:39 ` Russell King
0 siblings, 0 replies; 2+ messages in thread
From: Russell King @ 2006-09-06 22:39 UTC (permalink / raw)
To: Josef Whiter; +Cc: linux-serial, linux-kernel
On Wed, Sep 06, 2006 at 05:22:37PM -0400, Josef Whiter wrote:
> 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
Have you looked at 8250_early.c already in the kernel?
console= [KNL] Output console device and options.
uart,io,<addr>[,options]
uart,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.
--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 Serial core
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-09-06 22:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-06 21:22 [PATCH] RFE: add io= option to 8250 serial console Josef Whiter
2006-09-06 22:39 ` Russell King
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).