diff options
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.c')
| -rw-r--r-- | drivers/net/dsa/bcm_sf2.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index 3297604f8216..289e20443d83 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c | |||
| @@ -696,9 +696,20 @@ static int bcm_sf2_sw_setup(struct dsa_switch *ds) | |||
| 696 | } | 696 | } |
| 697 | 697 | ||
| 698 | /* Include the pseudo-PHY address and the broadcast PHY address to | 698 | /* Include the pseudo-PHY address and the broadcast PHY address to |
| 699 | * divert reads towards our workaround | 699 | * divert reads towards our workaround. This is only required for |
| 700 | * 7445D0, since 7445E0 disconnects the internal switch pseudo-PHY such | ||
| 701 | * that we can use the regular SWITCH_MDIO master controller instead. | ||
| 702 | * | ||
| 703 | * By default, DSA initializes ds->phys_mii_mask to ds->phys_port_mask | ||
| 704 | * to have a 1:1 mapping between Port address and PHY address in order | ||
| 705 | * to utilize the slave_mii_bus instance to read from Port PHYs. This is | ||
| 706 | * not what we want here, so we initialize phys_mii_mask 0 to always | ||
| 707 | * utilize the "master" MDIO bus backed by the "mdio-unimac" driver. | ||
| 700 | */ | 708 | */ |
| 701 | ds->phys_mii_mask |= ((1 << BRCM_PSEUDO_PHY_ADDR) | (1 << 0)); | 709 | if (of_machine_is_compatible("brcm,bcm7445d0")) |
| 710 | ds->phys_mii_mask |= ((1 << BRCM_PSEUDO_PHY_ADDR) | (1 << 0)); | ||
| 711 | else | ||
| 712 | ds->phys_mii_mask = 0; | ||
| 702 | 713 | ||
| 703 | rev = reg_readl(priv, REG_SWITCH_REVISION); | 714 | rev = reg_readl(priv, REG_SWITCH_REVISION); |
| 704 | priv->hw_params.top_rev = (rev >> SWITCH_TOP_REV_SHIFT) & | 715 | priv->hw_params.top_rev = (rev >> SWITCH_TOP_REV_SHIFT) & |
