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

From: Bjorn Helgaas (bjorn.helgaas_at_hp.com)
Date: 09/30/04

  • Next message: Roland Caßebohm: "Re: Serial driver hangs"
    To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Date:	Thu, 30 Sep 2004 10:14:00 -0600
    
    

    > What I propose is a way for the arch to provide it's own table along
    > with the size of it via a function call. It's optional, based on a
    > #ifdef defined by the arch in it's asm/serial.h. The only remaining
    > tricky point is the fact that you used to size your static array of
    > UART's based on the size of the table. So with my path, an arch
    > that defines ARCH_HAS_GET_LEGACY_SERIAL_PORTS is supposed to provide
    > both the new get_legacy_serial_ports() function, but also to define
    > UART_NR to something sensible. I hope one day, we'll be able to
    > convert 8250 to more dynamic allocation though.

    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.

    AFAICS, the only reason for doing serial8250_isa_init_ports() early
    is for early serial consoles, and I think those should be done along
    the lines of this:
     http://www.ussg.iu.edu/hypermail/linux/kernel/0409.1/1034.html
    where the platform can specify a device by its MMIO or IO port address,
    and we automatically switch to the corresponding ttyS device later.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Roland Caßebohm: "Re: Serial driver hangs"

    Relevant Pages

    • Re: [RFC][PATCH] Way for platforms to alter built-in serial ports
      ... > what you mean by moving to a more dynamic allocation. ... > where the platform can specify a device by its MMIO or IO port address, ... > and we automatically switch to the corresponding ttyS device later. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: xterm scrolling speed - scheduling weirdness in 2.6 ?!
      ... The scheduler isn't platform specific. ... Nick, ... > arch defines in your patch? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] alpha build fixes
      ... Since its a detail that varies widely depending on platform, the arch ... linux/pci.h would be fine place for the "generic version arch overrides ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] ppc64: Fix possible race with set_pte on a present PTE
      ... this case is useless on ppc... ... completely instead and define it's arch impl. ... ptep_set_dirty_accessedresponsibility to do the TLB flush if ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC] IDE/ATA/SATA controller hotplug
      ... > 1) be first class modules, where all controllers/adapters are ... > certainly do not care about having this capability. ... Not in a arch specific dir please. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)