From: Arnd Bergmann <arnd@arndb.de>
To: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
Cc: Sascha Hauer <s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Laurent Pinchart
<laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
SH-Linux <linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [RFC] Serial port aliases in DT
Date: Fri, 28 Mar 2014 10:28:05 +0000 [thread overview]
Message-ID: <14685448.67FSBAE5nm@wuerfel> (raw)
In-Reply-To: <CAMuHMdVYhGGt7+fR4oHzf-hDvTOWbHfhM2g92eo3RqULd6yR2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On Friday 28 March 2014 09:39:22 Geert Uytterhoeven wrote:
>
> On Fri, Mar 28, 2014 at 9:30 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Friday 28 March 2014 09:09:23 Geert Uytterhoeven wrote:
> >> On the Renesas SoCs, where this thread started, you also have different
> >> types of IP blocks providing similar functionality on the same SoC.
> >> E.g. 3 types of serial ports, 2 types of i2c, (at least) 2 types of spi...
> >> Hence one more level of confusion (is SoC serial0 the first serial port of
> >> type A, B, or C?).
> >
> > The 'serial' aliases are defined to refer to UARTs only, there is no debate
> > about that.
>
> All 3 serial port types are UARTs.
>
> For the serial ports, they are sufficiently similar to use the same driver.
> For i2c and spi, that's not the case, and they use different drivers.
Ok, I see. I just misunderstood what you meant.
The aliases are really meant to put all the uarts into a flat numbering space,
regardless of the driver, and you can mix them them in any possible way. If
a board uses one uart of each type, then serial0 through serial2 should
point to the three that are used, but not the ones that aren't connected.
Unfortunately, the Linux uart naming system doesn't work well with that,
because you'd end up with something like /dev/ttyA0, /dev/ttyC1, /dev/ttyB2
for the case that you are using the A, C and B drivers in that order.
I would argue that we should try to fix it by changing the way that Linux
allocates the names (in a backwards compatible way of course), not by changing
the DT binding.
Using a separate name space for each driver keeps causing more problems than
it solves, and we really should be addressing this. One way to do this
that I think would handle it nicely is to make it optional for a uart_driver
to provide a major/minor number range and device name for
uart_register_driver, and move the ttyS%d namespace handling from the 8250
driver into serial_core.c. There are a couple of open questions regarding
how to implement backwards compatibility with the existing behavior, but
I think it can be done.
Arnd
next prev parent reply other threads:[~2014-03-28 10:28 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-10 11:59 [RFC] Serial port aliases in DT Laurent Pinchart
2014-03-10 12:38 ` Wolfram Sang
2014-03-11 11:56 ` Laurent Pinchart
2014-03-11 12:46 ` Wolfram Sang
2014-03-12 10:40 ` Laurent Pinchart
2014-03-12 10:45 ` Wolfram Sang
2014-03-10 12:57 ` Arnd Bergmann
2014-03-11 11:57 ` Laurent Pinchart
2014-03-27 12:50 ` Laurent Pinchart
2014-03-27 13:54 ` Rob Herring
2014-03-27 14:43 ` Laurent Pinchart
2014-03-27 15:18 ` Sascha Hauer
[not found] ` <20140327151829.GX17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-27 18:26 ` Arnd Bergmann
2014-03-27 18:34 ` Pawel Moll
2014-03-27 20:07 ` Wolfram Sang
2014-03-28 7:28 ` Sascha Hauer
[not found] ` <20140328072827.GY17250-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-03-28 8:09 ` Geert Uytterhoeven
2014-03-28 8:30 ` Arnd Bergmann
2014-03-28 8:39 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVYhGGt7+fR4oHzf-hDvTOWbHfhM2g92eo3RqULd6yR2A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-28 10:28 ` Arnd Bergmann [this message]
2014-03-28 10:40 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVJ8Jid=bdWLb7g5MP5dFOwDkvoHEbFH4nQD5bWp-2sxw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-28 11:49 ` Arnd Bergmann
2014-03-28 14:46 ` Rob Herring
2014-03-27 20:34 ` Rob Herring
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=14685448.67FSBAE5nm@wuerfel \
--to=arnd@arndb.de \
--cc=devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org \
--cc=laurent.pinchart-ryLnwIuWjnjg/C1BVhZhaw@public.gmane.org \
--cc=linux-sh-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.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 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).