linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* OF device mappings
@ 2009-02-28 17:46 Gary Thomas
  2009-02-28 18:04 ` Grant Likely
  0 siblings, 1 reply; 8+ messages in thread
From: Gary Thomas @ 2009-02-28 17:46 UTC (permalink / raw)
  To: Linux PPC Development

Still looking for some help...  I need to be able to locate
the kernel platform_device which corresponds to an instance
from my OF tree.  Basically, I have a [somewhat] unrelated
driver which needs to know these things, so the drivers in
question should not have to be affected.

In particular, I'm working with the net/dsa drivers (Distributed
Switch Architecture) which need access to the network driver as
well as the MII/MDIO bus driver.  It doesn't make sense to tie
those drivers back to DSA, but rather let the DSA driver find
its way to them.

I've defined this in by DTS tree:
	lan1 {
		cell-index = <0x01>;
		compatible = "marvell,m88e609x";
		net_dev = "fsl-gianfar.0";
		mii_bus = "fsl-gianfar_mdio.14";
		net_devX = <&eth0>;
		mii_busX = <&mii_bus>;
	};
... two ways to find the same node.

Using 'net_dev' (which I admit is pretty hokey), I can look
up the corresponding platform device, which does work for
the DSA layer.  What I want is to be able to get to this
from the 'net_devX' pointer, but I don't seem to be able
to get out of the OF tree and into the actual platform
device tree to find the appropriate instance.

Any pointers?

Thanks

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-02-28 21:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-28 17:46 OF device mappings Gary Thomas
2009-02-28 18:04 ` Grant Likely
2009-02-28 18:21   ` Gary Thomas
2009-02-28 18:44     ` Grant Likely
2009-02-28 19:18       ` Gary Thomas
2009-02-28 20:19         ` Grant Likely
2009-02-28 20:25           ` Gary Thomas
2009-02-28 21:05         ` Benjamin Herrenschmidt

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).