Re: [RFC][PATCH] Way for platforms to alter built-in serial ports

From: Bjorn Helgaas
Date: Tue Nov 02 2004 - 11:46:35 EST


On Monday 01 November 2004 10:15 am, David Woodhouse wrote:
> The problem is that 'console=ttySx' doesn't actually do anything unless
> port numer 'x' is already registered and working. We should fix that --
> we ought to be able to use 'console=ttySx' on the command line and have
> the console get registered with the core printk code later, when some
> 8250 sub-driver (8250_platform, 8250_pci, etc.) actually registers the
> port which becomes number 'x'.

See serial8250_late_console_init(); does this do what you want?

> That would allow 'early' serial consoles to have none of the horrible
> special-cased 'earlyconsole' crap -- we just call register_serial() (or
> early_serial_setup() or whatever) as soon as it's actually possible to
> poke at the port.

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/early-uart-console-support.patch
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.10-rc1/2.6.10-rc1-mm2/broken-out/move-hcdp-pcdp-to-early-uart-console.patch

For platforms that define SERIAL_PORT_DFNS, early boot code could easily
recognize "console=ttyS0" and use SERIAL_PORT_DFNS to register
"console=uart,io,0x3f8".

If you don't have SERIAL_PORT_DFNS, early boot code doesn't know anything
about 'ttySx', so you need some other mechanism to find the device (the
user could specify it directly, or firmware could supply it).
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/