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

Tabi Timur-B04825 B04825 at freescale.com
Thu Aug 23 10:06:32 EST 2012


David Daney wrote:
>>
>> 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


More information about the devicetree-discuss mailing list