From: James Cameron <quozl@laptop.org>
To: Sergei Ianovich <ynvich@gmail.com>
Cc: Russell King - ARM Linux <linux@arm.linux.org.uk>,
"open list:OPEN FIRMWARE AND..." <devicetree@vger.kernel.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Ralf Baechle <ralf@linux-mips.org>,
linux-kernel@vger.kernel.org,
Rob Herring <rob.herring@calxeda.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
Grant Likely <grant.likely@linaro.org>,
Andrew Morton <akpm@linux-foundation.org>,
John Crispin <blogic@openwrt.org>, Jiri Slaby <jslaby@suse.cz>,
"moderated list:ARM PORT" <linux-arm-kernel@lists.infradead.org>,
Zhou Zhu <zzhu3@marvell.com>
Subject: Re: [PATCH] serial: rewrite pxa2xx-uart to use 8250_core
Date: Fri, 6 Dec 2013 22:05:43 +1100 [thread overview]
Message-ID: <20131206110542.GA14652@us.netrek.org> (raw)
In-Reply-To: <1386326057.7152.44.camel@host5.omatika.ru>
On Fri, Dec 06, 2013 at 02:34:17PM +0400, Sergei Ianovich wrote:
> On Fri, 2013-12-06 at 20:53 +1100, James Cameron wrote:
> > I don't understand why /dev/ttyS2 (4,66) changed to /dev/ttyS0 (4,64)
> > after the patch was applied to olpc-kernel/arm-3.5 but, as you say it
> > doesn't change, perhaps there is something between 3.5 and now for me
> > to watch out for. My problem.
>
> The old pxa.c set device ids explicitly:
> -static int serial_pxa_probe_dt(struct platform_device *pdev,
> - struct uart_pxa_port *sport)
> -{
> - struct device_node *np = pdev->dev.of_node;
> - int ret;
> -
> - if (!np)
> - return 1;
> -
> - ret = of_alias_get_id(np, "serial");
> - if (ret < 0) {
> - dev_err(&pdev->dev, "failed to get alias id, errno %d
> \n", ret);
> - return ret;
> - }
> - sport->port.line = ret;
> - return 0;
> -}
>
> and
>
> - ret = serial_pxa_probe_dt(dev, sport);
> - if (ret > 0)
> - sport->port.line = dev->id;
>
>
> However, this is not possible with 8250_core. The latter assigns device
> ids strictly in the call order of serial8250_register_8250_port().
>
> Hope it helps.
Yes, thanks, that explains it.
Your patch deprecates the use of property "linux,unit#" in the device
tree for serial ports, or the numbering according to the ordering of
the device tree.
(On OLPC XO-4, we set the numbering according to the ordering, we don't
use "linux,unit#".)
It is sad to see device tree sawdust. ;-)
--
James Cameron
http://quozl.linux.org.au/
next prev parent reply other threads:[~2013-12-06 11:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20131205043544.GA28580@kroah.com>
[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 [this message]
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
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=20131206110542.GA14652@us.netrek.org \
--to=quozl@laptop.org \
--cc=akpm@linux-foundation.org \
--cc=blogic@openwrt.org \
--cc=devicetree@vger.kernel.org \
--cc=grant.likely@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=haojian.zhuang@gmail.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=jslaby@suse.cz \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=ralf@linux-mips.org \
--cc=rob.herring@calxeda.com \
--cc=ynvich@gmail.com \
--cc=zzhu3@marvell.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;
as well as URLs for NNTP newsgroup(s).