linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: Maarten Brock <m.brock@vanmierlo.com>,
	Michal Simek <michal.simek@xilinx.com>
Cc: Greg KH <gregkh@linuxfoundation.org>,
	johan@kernel.org, linux-kernel@vger.kernel.org, monstr@monstr.eu,
	git@xilinx.com, Jiri Slaby <jslaby@suse.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-serial@vger.kernel.org, linux-serial-owner@vger.kernel.org
Subject: Re: [PATCH 0/7] serial: uartps: Revert dynamic port allocation
Date: Fri, 3 Apr 2020 17:56:48 +0200	[thread overview]
Message-ID: <a582c754-8803-0fc9-7ab3-0b79837a74ac@xilinx.com> (raw)
In-Reply-To: <211f564d5594994fc677d3fea4222997@vanmierlo.com>

On 03. 04. 20 17:48, Maarten Brock wrote:
> On 2020-04-03 11:51, Michal Simek wrote:
>>
>> Thanks. I am definitely interested to hear more how this could be done
>> differently because that hardcoded limits are painful.
>> On FPGAs you can have a lot of uarts for whatever reason and users are
>> using DT aliases to have consistent naming.
>> Specifically on Xilinx devices we are using uartps which is ttyPS,
>> uartlite which is ttyUL, ns16500 which is ttyS and also pl011 which is
>> ttyAMA.
>> Only ttyAMA or ttyPS on one chip are possible.
>>
>> And right now you can't have serial0 alias pointed ttyPS0 and another
>> serial0 pointed to ttyUL0 or ttyS0. That's why others are shifted and we
>> can reach that hardcoded NR_UART limit easily.
>> And this was the reason why I have done these patches in past to remove
>> any limit from these drivers and if user asks for serial100 alias you
>> simply get ttyPS100 node.
> 
> I would argue that the trouble originates from every uart driver using
> its own naming scheme and thereby creating separate namespaces. If all
> uarts would register as /dev/ttySnn then the serialN alias method would
> work. These non-overlapping namespaces is something the linux kernel
> driver community has allowed to happen.
> 
> If the namespaces are not abandoned and disallowed, then the serialN
> alias method must no longer be used for any driver that does not create
> /dev/ttySnn devices. Every namespace will require its own alias base.
> Or forget about deriving the number from an alias and set the number in
> a property in the device tree node itself. The latter has my preference.

Uartlite and as I see ucc_uart are only two driver which are using
port-number property for this purpose.
And IIRC this property was the part of any spec long time ago.

Thanks,
Michal

      reply	other threads:[~2020-04-03 15:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03  9:24 [PATCH 0/7] serial: uartps: Revert dynamic port allocation Michal Simek
2020-04-03  9:24 ` [PATCH 1/7] Revert "serial: uartps: Fix uartps_major handling" Michal Simek
2020-04-03  9:24 ` [PATCH 2/7] Revert "serial: uartps: Use the same dynamic major number for all ports" Michal Simek
2020-04-03  9:24 ` [PATCH 3/7] Revert "serial: uartps: Fix error path when alloc failed" Michal Simek
2020-04-03  9:24 ` [PATCH 4/7] Revert "serial: uartps: Do not allow use aliases >= MAX_UART_INSTANCES" Michal Simek
2020-04-03  9:24 ` [PATCH 5/7] Revert "serial: uartps: Change uart ID port allocation" Michal Simek
2020-04-03  9:24 ` [PATCH 6/7] Revert "serial: uartps: Move Port ID to device data structure" Michal Simek
2020-04-03  9:24 ` [PATCH 7/7] Revert "serial: uartps: Register own uart console and driver structures" Michal Simek
2020-04-03  9:32 ` [PATCH 0/7] serial: uartps: Revert dynamic port allocation Greg KH
2020-04-03  9:37   ` Michal Simek
2020-04-03  9:44     ` Greg KH
2020-04-03  9:51       ` Michal Simek
2020-04-03 15:48         ` Maarten Brock
2020-04-03 15:56           ` Michal Simek [this message]

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=a582c754-8803-0fc9-7ab3-0b79837a74ac@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=git@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johan@kernel.org \
    --cc=jslaby@suse.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial-owner@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=m.brock@vanmierlo.com \
    --cc=monstr@monstr.eu \
    /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;
as well as URLs for NNTP newsgroup(s).