linux-sh.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: 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 07:28:27 +0000	[thread overview]
Message-ID: <20140328072827.GY17250@pengutronix.de> (raw)
In-Reply-To: <4966076.uASvrV0Iy2@wuerfel>

On Thu, Mar 27, 2014 at 07:26:27PM +0100, Arnd Bergmann wrote:
> On Thursday 27 March 2014 16:18:29 Sascha Hauer wrote:
> > On Thu, Mar 27, 2014 at 08:54:09AM -0500, Rob Herring wrote:
> > > >>
> > > >> > This however comes back to the more general issue of serial port device
> > > >> > naming: Linux traditionally uses separate names per driver (e.g. ttySC0
> > > >> > instead of ttyS0).
> > > >> >
> > > >> > There has been discussion in the past about changing this to let all
> > > >> > drivers use the same namespace, but it's not yet clear to me how we'd do
> > > >> > this in a 100% backwards compatible way. Maybe it's best left to udev to
> > > >> > figure out the driver independent name, but then we definitely should use
> > > >> > the alias for that name.
> > > 
> > > This discussion has come up in just the last month or so.
> > > 
> > > My opinion is device name numbering should start at 0 with 0 being the
> > > preferred console device.
> > 
> > That's completely different to everything I've heard and seen so far 
> > 
> > For specifying the console we have the linux,stdout-path property in the
> > chosen node. My preferred console may not be a serial port at all in
> > which case I would end up with a serial0 = &lcd0 alias.
> 
> Agreed. Also, don't we already have /dev/console for the preferred console
> device?
> 
> >  Many
> > devicetrees specify aliases for i2c/spi/mmc controllers aswell.  Should
> > they order their i2c controllers in the order of preference now?
> > 
> > Most dtsi files in the kernel specify a SoC specific order of aliases
> > and I think this makes the most sense.
> 
> I disagree with this one: the aliases should be a board specific
> property, if not settable in the boot loader. This is how it traditionally
> work on OF, and I think it's the most sensible approach for end users:
> If the machine has multiple serial ports coming out the back, they are
> normally numbered in some way, and the numbers should match what you
> see in the OS, regardless of what the SoC calls them.

Freescale starts numbering the devices at 1, Linux normally starts at 0.
This leads to enough confusion already. I really don't want to have an
additional board vendor specific translation. This would mean when
talking about an UART we would not only have to make clear whether we
mean freescale numbering or Linux numbering, but also whether we me mean
board vendor numbering. Things like earlyprintk would still have the SoC
numbering. Bootloaders which still use the SoC numbering would add to
the confusion.
I really don't think making the numbering board specific is going to
improve the situation.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  parent reply	other threads:[~2014-03-28  7: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 [this message]
     [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
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=20140328072827.GY17250@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=devicetree-spec-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@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=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).