Thread (5 messages) flat view 5 messages, 4 authors, 2012-08-23

Re: [PATCH] netdev/phy: add MDIO bus multiplexer driven by a memory-mapped FPGA

From: Tabi Timur-B04825 <hidden>
Date: 2012-08-23 00:06:32
Also in: linux-devicetree

David Daney wrote:
quoted
The problem is that we don't normally consider the FPGA node to be a bus,
so its child nodes won't get probed.  That's why I have this:
That would seem to be a mistake/error.
Maybe I'm not explaining myself well.  A node that has children will not 
automatically probe the children unless something in arch code registers 
the parent as a bus.  If you look in corenet_ds.c, you'll see what we do 
with array of_device_ids[].  We list all of the nodes that are buses.  The 
mdio-mux root-level nodes that I have today won't work unless I add 
.compatible = "mdio-mux" to of_device_ids[].
You should be able to arrive at any directly addressable register by
walking down the tree to the children and applying any "ranges" properties
at each node.  The OF infrastructure will take care of resolving all the
addresses and you get rid of much of the code you added to duplicate its
function.
That only works for buses that are already registered.  I think if I add 
"simple-bus" to the compatible of the FPGA node, it will work.  I'll try 
that tomorrow.

-- 
Timur Tabi
Linux kernel developer at Freescale
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help