From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Sergei Ianovich <ynvich@gmail.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>,
"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH 01/11] resolve PXA<->8250 serial device address conflict
Date: Mon, 2 Dec 2013 11:02:53 +0200 [thread overview]
Message-ID: <20131202090253.GE3942@xps8300> (raw)
In-Reply-To: <1385879185-22455-2-git-send-email-ynvich@gmail.com>
Hi,
On Sun, Dec 01, 2013 at 10:26:14AM +0400, Sergei Ianovich wrote:
> PXA serial ports have "standard" UART names (ttyS[0-3]), major
> device number (4) and first minor device number (64) by default.
>
> If the system has extra 8250 serial port hardware in addition
> to onboard PXA serial ports, default settings produce a device
> allocation conflict.
>
> The patch provides a configuration option which can move onboard
> ports out of the way of 8250_core by assigning a different (204)
> major number and corresponding device names (ttySA[0-3]).
>
> Signed-off-by: Sergei Ianovich <ynvich@gmail.com>
> ---
> drivers/tty/serial/Kconfig | 19 +++++++++++++++++++
> drivers/tty/serial/pxa.c | 22 ++++++++++++++++++----
> 2 files changed, 37 insertions(+), 4 deletions(-)
> diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c
<snip>
> --- a/drivers/tty/serial/pxa.c
> +++ b/drivers/tty/serial/pxa.c
> @@ -593,6 +593,20 @@ serial_pxa_type(struct uart_port *port)
> static struct uart_pxa_port *serial_pxa_ports[4];
> static struct uart_driver serial_pxa_reg;
>
> +#ifndef CONFIG_SERIAL_PXA_AS_TTYSA
> +
> +#define PXA_TTY_NAME "ttyS"
> +#define PXA_TTY_MAJOR TTY_MAJOR
> +#define PXA_TTY_MINOR 64
> +
> +#else
> +
> +#define PXA_TTY_NAME "ttySA"
> +#define PXA_TTY_MAJOR 204
> +#define PXA_TTY_MINOR 5
> +
> +#endif
> +
> #ifdef CONFIG_SERIAL_PXA_CONSOLE
>
> #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
> @@ -751,7 +765,7 @@ serial_pxa_console_setup(struct console *co, char *options)
> }
>
> static struct console serial_pxa_console = {
> - .name = "ttyS",
> + .name = PXA_TTY_NAME,
> .write = serial_pxa_console_write,
> .device = uart_console_device,
> .setup = serial_pxa_console_setup,
> @@ -792,9 +806,9 @@ static struct uart_ops serial_pxa_pops = {
> static struct uart_driver serial_pxa_reg = {
> .owner = THIS_MODULE,
> .driver_name = "PXA serial",
> - .dev_name = "ttyS",
> - .major = TTY_MAJOR,
> - .minor = 64,
> + .dev_name = PXA_TTY_NAME,
> + .major = PXA_TTY_MAJOR,
> + .minor = PXA_TTY_MINOR,
> .nr = 4,
> .cons = PXA_CONSOLE,
> };
If drivers/tty/serial/pxa.c was converted to an other probe driver for
the 8250, this would not be an issue.
Br,
--
heikki
next prev parent reply other threads:[~2013-12-02 9:03 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1385879185-22455-1-git-send-email-ynvich@gmail.com>
2013-12-01 6:26 ` [PATCH 01/11] resolve PXA<->8250 serial device address conflict Sergei Ianovich
2013-12-02 9:02 ` Heikki Krogerus [this message]
2013-12-02 9:23 ` Sergei Ianovich
2013-12-02 9:49 ` Heikki Krogerus
2013-12-02 10:26 ` Sergei Ianovich
2013-12-02 14:10 ` Heikki Krogerus
2013-12-05 4:12 ` Greg Kroah-Hartman
2013-12-05 4:31 ` Sergei Ianovich
2013-12-05 4:35 ` Greg Kroah-Hartman
2013-12-05 4:36 ` Sergei Ianovich
[not found] ` <20131205043544.GA28580-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-12-05 23:28 ` [PATCH] serial: rewrite pxa2xx-uart to use 8250_core Sergei Ianovich
[not found] ` <1386286149-2855-1-git-send-email-ynvich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-12-06 0:02 ` Greg Kroah-Hartman
[not found] ` <20131206000253.GC21358-U8xfFu+wG4EAvxtiuMwx3w@public.gmane.org>
2013-12-06 0:17 ` Russell King - ARM Linux
2013-12-06 9:28 ` Sergei Ianovich
2013-12-06 9:53 ` James Cameron
2013-12-06 10:34 ` Sergei Ianovich
2013-12-06 11:05 ` James Cameron
2013-12-06 0:38 ` James Cameron
2013-12-06 2:55 ` James Cameron
2013-12-06 2:42 ` James Cameron
2013-12-06 9:16 ` Sergei Ianovich
2013-12-06 9:09 ` [PATCH v2] " Sergei Ianovich
2013-12-06 9:28 ` James Cameron
2013-12-09 8:38 ` Heikki Krogerus
2013-12-09 8:44 ` Sascha Hauer
2013-12-09 11:38 ` [PATCH v3] " Sergei Ianovich
2014-01-28 14:14 ` [PATCH 01/11] resolve PXA<->8250 serial device address conflict Pavel Machek
2014-01-28 14:20 ` Sergei Ianovich
2013-12-01 6:26 ` [PATCH 05/11] serial: support for 16550 serial ports on LP-8x4x Sergei Ianovich
2013-12-02 8:48 ` Heikki Krogerus
2013-12-02 11:46 ` Sergei Ianovich
2013-12-02 13:53 ` Heikki Krogerus
2013-12-02 11:30 ` Russell King - ARM Linux
2013-12-02 11:39 ` Sergei Ianovich
2013-12-02 11:52 ` Russell King - ARM Linux
2013-12-02 12:01 ` Sergei Ianovich
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=20131202090253.GE3942@xps8300 \
--to=heikki.krogerus@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=ynvich@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox