lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 6 Mar 2014 15:46:00 +0100 From: Andrew Lunn <andrew@...n.ch> To: Gregory CLEMENT <gregory.clement@...e-electrons.com> Cc: Andrew Lunn <andrew@...n.ch>, Jason Cooper <jason@...edaemon.net>, Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>, Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>, Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>, linux-arm-kernel@...ts.infradead.org, Lior Amsalem <alior@...vell.com>, Tawfik Bayouk <tawfik@...vell.com>, Nadav Haklai <nadavh@...vell.com>, devicetree@...r.kernel.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH] ARM: mvebu: add Device Tree for the Armada 385 RD board > >>> I think you can use aliases to get the order correct, independent of > >>> how you list them in DT. That should be a lot safer than assuming > >>> things are instantiated from top to bottom. > >> > >> It sounds interesting, how would you do this? > > > > As there already is in armada-370-xp.dtsi > > > > aliases { > > eth0 = ð0; > > eth1 = ð1; > > }; > > > > > > eth0: ethernet@...00 { > > } > > eth1: ethernet@...00 { > > } > > > > This at least works for i2c devices. The pdev->id is set using the > > alias number. > > Well I think it doesn't work with ethernet devices because we already do > this in aramda-38x.dtsi: > > aliases { > gpio0 = &gpio0; > gpio1 = &gpio1; > eth0 = ð0; > eth1 = ð1; > eth2 = ð2; > }; > > eth1: ethernet@...00 { > } > eth2: ethernet@...00 { > } > eth0: ethernet@...00 { > } Ah, Erm, O.K. It seems to be an i2c thing. Take a look at i2c_add_adapter(). if (dev->of_node) { id = of_alias_get_id(dev->of_node, "i2c"); You could put something similar into the ethernet driver. Andrew -- 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