[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131206110542.GA14652@us.netrek.org>
Date: Fri, 6 Dec 2013 22:05:43 +1100
From: James Cameron <quozl@...top.org>
To: Sergei Ianovich <ynvich@...il.com>
Cc: Russell King - ARM Linux <linux@....linux.org.uk>,
"open list:OPEN FIRMWARE AND..." <devicetree@...r.kernel.org>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Ralf Baechle <ralf@...ux-mips.org>,
linux-kernel@...r.kernel.org,
Rob Herring <rob.herring@...xeda.com>,
Haojian Zhuang <haojian.zhuang@...il.com>,
"open list:SERIAL DRIVERS" <linux-serial@...r.kernel.org>,
Grant Likely <grant.likely@...aro.org>,
Andrew Morton <akpm@...ux-foundation.org>,
John Crispin <blogic@...nwrt.org>, Jiri Slaby <jslaby@...e.cz>,
"moderated list:ARM PORT" <linux-arm-kernel@...ts.infradead.org>,
Zhou Zhu <zzhu3@...vell.com>
Subject: Re: [PATCH] serial: rewrite pxa2xx-uart to use 8250_core
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/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists