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

From: Russell King
Date: Wed Oct 06 2004 - 02:34:10 EST


On Fri, Oct 01, 2004 at 08:58:27AM -0600, Bjorn Helgaas wrote:
> On Thursday 30 September 2004 5:53 pm, Benjamin Herrenschmidt wrote:
> > On Fri, 2004-10-01 at 02:14, Bjorn Helgaas wrote:
> >
> > > This looks like a reasonable short-term fix, but I think the whole
> > > serial8250_isa_init_ports() should go away. I like dwmw2's suggestion
> > > of an 8250_platform.c that could use register_serial() for each port
> > > in some platform-supplied old_serial_port[] table, which is probably
> > > what you mean by moving to a more dynamic allocation.
> >
> > What would this file look like ? a bunch of platform #ifdef's with
> > different implementations each time ?
>
> My main point is that I think the early init stuff (i.e.,
> serial8250_isa_init_ports()) should go away, so we don't have the
> dichotomy of having the compiled-in stuff handled differently than
> the run-time enumerated stuff.

You're always going to have this. For instance, the standard ISA serial
ports may not show up in any "enumerated stuff" on an x86 box - and x86
people expect that the port at 0x3f8 is ttyS0, 2f8 is ttyS1 etc.

Change that order and they'll scream at you.

> It really doesn't matter for ia64, since we discover all the ports
> via either PCI enumeration or ACPI. We don't put anything in
> old_serial_port[] at all. For platforms that can't do that,
> there'd still have to be compiled-in tables, but the entries
> should be added using the standard register_serial() interface
> just like everything else.

See my previous mail why this doesn't work - x86 serial console
requirements.

I think you'll do better to discuss this problem with Alan so that
he can change his (and maybe others) points of view wrt when the
serial console is initialised. Until then I'm going to continue
sitting on the fence on this point.

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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/