From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
linuxppc64-dev <linuxppc64-dev@ozlabs.org>
Subject: Re: [RFC][PATCH] Way for platforms to alter built-in serial ports
Date: Wed, 6 Oct 2004 08:26:59 +0100 [thread overview]
Message-ID: <20041006082658.A18379@flint.arm.linux.org.uk> (raw)
In-Reply-To: <1096534248.32721.36.camel@gaston>; from benh@kernel.crashing.org on Thu, Sep 30, 2004 at 06:50:48PM +1000
On Thu, Sep 30, 2004 at 06:50:48PM +1000, Benjamin Herrenschmidt wrote:
> +#ifndef ARCH_HAS_GET_LEGACY_SERIAL_PORTS
> static struct old_serial_port old_serial_port[] = {
> SERIAL_PORT_DFNS /* defined in asm/serial.h */
> };
> -
> +static inline struct old_serial_port *get_legacy_serial_ports(unsigned int *count)
> +{
> + *count = ARRAY_SIZE(old_serial_port);
> + return old_serial_port;
> +}
> #define UART_NR (ARRAY_SIZE(old_serial_port) + CONFIG_SERIAL_8250_NR_UARTS)
> +#endif /* ARCH_HAS_GET_LEGACY_SERIAL_PORTS */
> +
What happens if 8250.c is built as a module and
ARCH_HAS_GET_LEGACY_SERIAL_PORTS is defined?
> diff -urN linux-2.5/include/linux/serial.h linux-maple/include/linux/serial.h
> --- linux-2.5/include/linux/serial.h 2004-09-30 18:31:55.867785437 +1000
> +++ linux-maple/include/linux/serial.h 2004-09-30 15:36:57.981697919 +1000
> @@ -14,6 +14,21 @@
> #include <asm/page.h>
>
> /*
> + * Definition of a legacy serial port
> + */
> +struct old_serial_port {
> + unsigned int uart;
> + unsigned int baud_base;
> + unsigned int port;
> + unsigned int irq;
> + unsigned int flags;
> + unsigned char hub6;
> + unsigned char io_type;
> + unsigned char *iomem_base;
> + unsigned short iomem_reg_shift;
> +};
> +
> +/*
> * Counters of the input lines (CTS, DSR, RI, CD) interrupts
> */
serial.h is used by userspace programs. We should not expose this
structure to those programs. Instead, maybe creating an 8250.h
header, or even moving the existing 8250.h header ?
--
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
next prev parent reply other threads:[~2004-10-06 7:27 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-30 8:50 [RFC][PATCH] Way for platforms to alter built-in serial ports Benjamin Herrenschmidt
2004-10-06 7:26 ` Russell King [this message]
2004-10-06 8:15 ` Benjamin Herrenschmidt
2004-10-06 9:07 ` Benjamin Herrenschmidt
-- strict thread matches above, loose matches on Subject: below --
2004-09-30 16:14 Bjorn Helgaas
2004-09-30 23:53 ` Benjamin Herrenschmidt
2004-10-01 14:58 ` Bjorn Helgaas
2004-10-02 6:45 ` Benjamin Herrenschmidt
2004-10-06 7:32 ` Russell King
2004-10-06 19:54 ` Bjorn Helgaas
2004-10-08 19:49 ` Bjorn Helgaas
2004-10-06 7:29 ` Russell King
2004-10-06 19:47 ` Bjorn Helgaas
2004-11-01 17:15 ` David Woodhouse
2004-11-02 16:39 ` Bjorn Helgaas
2004-11-03 7:43 ` Russell King
2004-11-03 12:07 ` David Woodhouse
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=20041006082658.A18379@flint.arm.linux.org.uk \
--to=rmk+lkml@arm.linux.org.uk \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc64-dev@ozlabs.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.