Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-13 Thread Florian Fainelli
On 04/13/2017 02:51 PM, Andrew Lunn wrote: >> The DT binding is in tree and provides an example of how the switch >> looks like, below is the example, but I am also adding the MDIO bus and >> the PHYs just so you can see how things wind up: >> >> switch_top@f0b0 { >> compatible =

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-13 Thread Andrew Lunn
> The DT binding is in tree and provides an example of how the switch > looks like, below is the example, but I am also adding the MDIO bus and > the PHYs just so you can see how things wind up: > > switch_top@f0b0 { > compatible = "simple-bus"; > #size-cells = <1>; >

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-13 Thread David Miller
From: Florian Fainelli Date: Mon, 10 Apr 2017 14:42:58 -0700 > A MDIO bus driver can set phy_mask to indicate which PHYs should be > probed and which should not. Right now, of_mdiobus_register() always > sets mdio->phy_mask to ~0 which means: don't probe anything yourself,

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-12 Thread Florian Fainelli
On 04/12/2017 03:10 PM, Andrew Lunn wrote: > To give some more background and rational for this change. > > On a platform where we have a parent MDIO bus, backed by the > mdio-bcm-unimac.c driver, we also register a slave MII bus (through > net/dsa/dsa2.c) which is parented to

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-12 Thread Andrew Lunn
> >>> To give some more background and rational for this change. > >>> > >>> On a platform where we have a parent MDIO bus, backed by the > >>> mdio-bcm-unimac.c driver, we also register a slave MII bus (through > >>> net/dsa/dsa2.c) which is parented to this UniMAC MDIO bus through an > >>>

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-12 Thread Florian Fainelli
On 04/11/2017 04:23 PM, Florian Fainelli wrote: > On 04/11/2017 04:14 PM, Andrew Lunn wrote: >>> To give some more background and rational for this change. >>> >>> On a platform where we have a parent MDIO bus, backed by the >>> mdio-bcm-unimac.c driver, we also register a slave MII bus (through

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-11 Thread Florian Fainelli
On 04/11/2017 04:14 PM, Andrew Lunn wrote: >> To give some more background and rational for this change. >> >> On a platform where we have a parent MDIO bus, backed by the >> mdio-bcm-unimac.c driver, we also register a slave MII bus (through >> net/dsa/dsa2.c) which is parented to this UniMAC

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-11 Thread Andrew Lunn
> To give some more background and rational for this change. > > On a platform where we have a parent MDIO bus, backed by the > mdio-bcm-unimac.c driver, we also register a slave MII bus (through > net/dsa/dsa2.c) which is parented to this UniMAC MDIO bus through an > assignment of of_node. This

Re: [RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-11 Thread Florian Fainelli
On 04/10/2017 02:42 PM, Florian Fainelli wrote: > A MDIO bus driver can set phy_mask to indicate which PHYs should be > probed and which should not. Right now, of_mdiobus_register() always > sets mdio->phy_mask to ~0 which means: don't probe anything yourself, > and let the Device Tree scanning do

[RFC net-next] of: mdio: Honor hints from MDIO bus drivers

2017-04-10 Thread Florian Fainelli
A MDIO bus driver can set phy_mask to indicate which PHYs should be probed and which should not. Right now, of_mdiobus_register() always sets mdio->phy_mask to ~0 which means: don't probe anything yourself, and let the Device Tree scanning do it based on the availability of child nodes. When MDIO