All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Rob Herring <robh@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.cz>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>
Subject: Re: [PATCH 2/3] tty/serial: of_serial: add support for PXA/MMP uarts
Date: Tue, 27 Jan 2015 10:09:33 -0500	[thread overview]
Message-ID: <54C7AA2D.7080202@hurleysoftware.com> (raw)
In-Reply-To: <CAL_Jsq+8jDN+fYyed5RYd2e1K+H_R1NkjT38WXSpKfxTLgsDbQ@mail.gmail.com>

On 01/27/2015 09:30 AM, Rob Herring wrote:
> On Tue, Jan 27, 2015 at 6:44 AM, Peter Hurley <peter@hurleysoftware.com> wrote:
>> Hi Rob,
>>
>> On 01/26/2015 11:50 PM, Rob Herring wrote:
>>> Add mrvl,pxa-uart and mrvl,mmp-uart compatible strings for the of_serial
>>> driver. These are 8250 variants which have a port type of PORT_XSCALE.
>>>
>>> There is also the serial driver pxa.c with these compatible strings
>>> already. However, it can be replaced with the common 8250 driver. It has
>>> some issues like it cannot coexist with the 8250 driver due to tty name
>>> collision. That also means adding these compatible strings here should
>>> not case a problem.
>>
>> So what determines which driver is controlling the port if both
>> drivers are built-in?
> 
> If both are built-in, whoever registers ttyS ports first wins. This
> will be the 8250 driver due to link order.

Ok, but then I think the commit log should reflect that this patch
effectively replaces pxa2xx-uart driver with the 8250 driver for PXA/MMP uarts
if both drivers are built-in or both drivers are modules.

> So I guess PXA systems have avoided this by never building in 8250 driver.

Platform devices are initialized first, so before this patch the pxa2xx-uart
driver would have claimed the platform ports before the 8250 driver, if
both were built-in (or both modules).

Maybe Kconfig should warn if they're both built-in or both modules?

Regards,
Peter Hurley

>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>> Cc: Jiri Slaby <jslaby@suse.cz>
>>> Cc: linux-serial@vger.kernel.org
>>> ---
>>>  drivers/tty/serial/of_serial.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
>>> index 3194b42..fbb719c 100644
>>> --- a/drivers/tty/serial/of_serial.c
>>> +++ b/drivers/tty/serial/of_serial.c
>>> @@ -335,6 +335,10 @@ static struct of_device_id of_platform_serial_table[] = {
>>>               .data = (void *)PORT_ALTR_16550_F64, },
>>>       { .compatible = "altr,16550-FIFO128",
>>>               .data = (void *)PORT_ALTR_16550_F128, },
>>> +     { .compatible = "mrvl,mmp-uart",
>>> +             .data = (void *)PORT_XSCALE, },
>>> +     { .compatible = "mrvl,pxa-uart",
>>> +             .data = (void *)PORT_XSCALE, },
>>>  #ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
>>>       { .compatible = "ibm,qpace-nwp-serial",
>>>               .data = (void *)PORT_NWPSERIAL, },
>>>
>>

WARNING: multiple messages have this Message-ID (diff)
From: peter@hurleysoftware.com (Peter Hurley)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] tty/serial: of_serial: add support for PXA/MMP uarts
Date: Tue, 27 Jan 2015 10:09:33 -0500	[thread overview]
Message-ID: <54C7AA2D.7080202@hurleysoftware.com> (raw)
In-Reply-To: <CAL_Jsq+8jDN+fYyed5RYd2e1K+H_R1NkjT38WXSpKfxTLgsDbQ@mail.gmail.com>

On 01/27/2015 09:30 AM, Rob Herring wrote:
> On Tue, Jan 27, 2015 at 6:44 AM, Peter Hurley <peter@hurleysoftware.com> wrote:
>> Hi Rob,
>>
>> On 01/26/2015 11:50 PM, Rob Herring wrote:
>>> Add mrvl,pxa-uart and mrvl,mmp-uart compatible strings for the of_serial
>>> driver. These are 8250 variants which have a port type of PORT_XSCALE.
>>>
>>> There is also the serial driver pxa.c with these compatible strings
>>> already. However, it can be replaced with the common 8250 driver. It has
>>> some issues like it cannot coexist with the 8250 driver due to tty name
>>> collision. That also means adding these compatible strings here should
>>> not case a problem.
>>
>> So what determines which driver is controlling the port if both
>> drivers are built-in?
> 
> If both are built-in, whoever registers ttyS ports first wins. This
> will be the 8250 driver due to link order.

Ok, but then I think the commit log should reflect that this patch
effectively replaces pxa2xx-uart driver with the 8250 driver for PXA/MMP uarts
if both drivers are built-in or both drivers are modules.

> So I guess PXA systems have avoided this by never building in 8250 driver.

Platform devices are initialized first, so before this patch the pxa2xx-uart
driver would have claimed the platform ports before the 8250 driver, if
both were built-in (or both modules).

Maybe Kconfig should warn if they're both built-in or both modules?

Regards,
Peter Hurley

>>> Signed-off-by: Rob Herring <robh@kernel.org>
>>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>>> Cc: Jiri Slaby <jslaby@suse.cz>
>>> Cc: linux-serial at vger.kernel.org
>>> ---
>>>  drivers/tty/serial/of_serial.c | 4 ++++
>>>  1 file changed, 4 insertions(+)
>>>
>>> diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
>>> index 3194b42..fbb719c 100644
>>> --- a/drivers/tty/serial/of_serial.c
>>> +++ b/drivers/tty/serial/of_serial.c
>>> @@ -335,6 +335,10 @@ static struct of_device_id of_platform_serial_table[] = {
>>>               .data = (void *)PORT_ALTR_16550_F64, },
>>>       { .compatible = "altr,16550-FIFO128",
>>>               .data = (void *)PORT_ALTR_16550_F128, },
>>> +     { .compatible = "mrvl,mmp-uart",
>>> +             .data = (void *)PORT_XSCALE, },
>>> +     { .compatible = "mrvl,pxa-uart",
>>> +             .data = (void *)PORT_XSCALE, },
>>>  #ifdef CONFIG_SERIAL_OF_PLATFORM_NWPSERIAL
>>>       { .compatible = "ibm,qpace-nwp-serial",
>>>               .data = (void *)PORT_NWPSERIAL, },
>>>
>>

  reply	other threads:[~2015-01-27 15:09 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-27  4:50 [PATCH 1/3] tty/serial: of_serial: add DT alias ID handling Rob Herring
2015-01-27  4:50 ` Rob Herring
2015-01-27  4:50 ` [PATCH 2/3] tty/serial: of_serial: add support for PXA/MMP uarts Rob Herring
2015-01-27  4:50   ` Rob Herring
2015-01-27 12:44   ` Peter Hurley
2015-01-27 12:44     ` Peter Hurley
2015-01-27 14:30     ` Rob Herring
2015-01-27 14:30       ` Rob Herring
2015-01-27 15:09       ` Peter Hurley [this message]
2015-01-27 15:09         ` Peter Hurley
2015-01-27 16:44         ` Rob Herring
2015-01-27 16:44           ` Rob Herring
2015-01-27 19:43           ` Peter Hurley
2015-01-27 19:43             ` Peter Hurley
2015-01-28 14:21             ` Rob Herring
2015-01-28 14:21               ` Rob Herring
2015-01-28 17:06               ` Peter Hurley
2015-01-28 17:06                 ` Peter Hurley
2015-01-28 17:37           ` Peter Hurley
2015-01-28 17:37             ` Peter Hurley
2015-01-30 19:51             ` Rob Herring
2015-01-30 19:51               ` Rob Herring
2015-01-30 20:24               ` Peter Hurley
2015-01-30 20:24                 ` Peter Hurley
2015-02-01 17:07                 ` Peter Hurley
2015-02-01 17:07                   ` Peter Hurley
2015-01-27  4:50 ` [PATCH 3/3] tty/serial: 8250_early: Add support for PXA UARTs Rob Herring
2015-01-27  4:50   ` Rob Herring
2015-01-27 13:10   ` Peter Hurley
2015-01-27 13:10     ` Peter Hurley
2015-01-27 14:05     ` Rob Herring
2015-01-27 14:05       ` Rob Herring
2015-01-27 14:25       ` Peter Hurley
2015-01-27 14:25         ` Peter Hurley

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=54C7AA2D.7080202@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=robh@kernel.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.