diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2016-06-07 16:32:43 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-08 11:23:42 -0700 |
commit | 461cd1b03e321e9c4ed1b831c80965c69a7b761b (patch) | |
tree | e12125301d6d5b2edd6f92c62539a509b89efe56 /drivers/net/dsa/bcm_sf2.h | |
parent | 0c73c523cf737b5d446705392e0e14ee0411a351 (diff) | |
download | linux-stable-461cd1b03e321e9c4ed1b831c80965c69a7b761b.tar.gz linux-stable-461cd1b03e321e9c4ed1b831c80965c69a7b761b.tar.bz2 linux-stable-461cd1b03e321e9c4ed1b831c80965c69a7b761b.zip |
net: dsa: bcm_sf2: Register our slave MDIO bus
Register a slave MDIO bus which allows us to divert problematic
read/writes towards conflicting pseudo-PHY address (30). Do no longer
rely on DSA's slave_mii_bus, but instead provide our own implementation
which offers more flexibility as to what to do, and when to register it.
We need to register it by the time we are able to get access to our
memory mapped registers, which is not until drv->setup() time. In order
to avoid forward declarations, we need to re-order the function bodies a
bit.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.h')
-rw-r--r-- | drivers/net/dsa/bcm_sf2.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/dsa/bcm_sf2.h b/drivers/net/dsa/bcm_sf2.h index 200b1f5fdb56..bde11ebb2742 100644 --- a/drivers/net/dsa/bcm_sf2.h +++ b/drivers/net/dsa/bcm_sf2.h @@ -142,6 +142,12 @@ struct bcm_sf2_priv { /* Bitmask of ports having an integrated PHY */ unsigned int int_phy_mask; + + /* Master and slave MDIO bus controller */ + unsigned int indir_phy_mask; + struct device_node *master_mii_dn; + struct mii_bus *slave_mii_bus; + struct mii_bus *master_mii_bus; }; struct bcm_sf2_hw_stats { |