diff options
author | David S. Miller <davem@davemloft.net> | 2015-06-10 23:33:59 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-06-10 23:33:59 -0700 |
commit | 1531407c81830e8b9b0fb00d4f49bcc1ee91dfd1 (patch) | |
tree | 2f3b239538e5b2d3bbeeba06d3f74ed9465dc18f /drivers/net/dsa/bcm_sf2.c | |
parent | f9c2ff22bb2df7b8f153afd2a4bea07176bad144 (diff) | |
parent | aafc66f106c03336e6e4ab9fd741c2b33110b7be (diff) |
Merge branch 'brcm-pseudo-phy-addr'
Florian Fainelli says:
====================
net: phy: broadcom: define pseudo-PHY address
This patch series converts existing in-tree users of the Broadcom pseudo-PHY
address (30) used to configure MDIO-connected switches to share a constant in a
shared header files.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.c')
-rw-r--r-- | drivers/net/dsa/bcm_sf2.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index 103fde3da476..972982f8bea7 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -24,6 +24,7 @@ #include <net/dsa.h> #include <linux/ethtool.h> #include <linux/if_bridge.h> +#include <linux/brcmphy.h> #include "bcm_sf2.h" #include "bcm_sf2_regs.h" @@ -697,7 +698,7 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds) /* Include the pseudo-PHY address and the broadcast PHY address to * divert reads towards our workaround */ - ds->phys_mii_mask |= ((1 << 30) | (1 << 0)); + ds->phys_mii_mask |= ((1 << BRCM_PSEUDO_PHY_ADDR) | (1 << 0)); rev = reg_readl(priv, REG_SWITCH_REVISION); priv->hw_params.top_rev = (rev >> SWITCH_TOP_REV_SHIFT) & @@ -782,7 +783,7 @@ static int bcm_sf2_sw_phy_read(struct dsa_switch *ds, int addr, int regnum) */ switch (addr) { case 0: - case 30: + case BRCM_PSEUDO_PHY_ADDR: return bcm_sf2_sw_indir_rw(ds, 1, addr, regnum, 0); default: return 0xffff; @@ -797,7 +798,7 @@ static int bcm_sf2_sw_phy_write(struct dsa_switch *ds, int addr, int regnum, */ switch (addr) { case 0: - case 30: + case BRCM_PSEUDO_PHY_ADDR: bcm_sf2_sw_indir_rw(ds, 0, addr, regnum, val); break; } |