summaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/bcm_sf2.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2015-08-05 23:55:52 +0200
committerThomas Gleixner <tglx@linutronix.de>2015-08-06 00:00:32 +0200
commitb7edaca4e825fd5d7a6ddce3548cc1f7a7337cf8 (patch)
tree221d6c5be36fa3b2133200ebc3e520d4382dca8f /drivers/net/dsa/bcm_sf2.c
parentx86/apic: Drop local_irq_save/restore in timer callbacks (diff)
parentLinux 4.2-rc4 (diff)
downloadlinux-b7edaca4e825fd5d7a6ddce3548cc1f7a7337cf8.tar.xz
linux-b7edaca4e825fd5d7a6ddce3548cc1f7a7337cf8.zip
Merge branch 'linus' into x86/apic
Pull in upstream changes to avoid conflicts
Diffstat (limited to 'drivers/net/dsa/bcm_sf2.c')
-rw-r--r--drivers/net/dsa/bcm_sf2.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c
index 972982f8bea7..079897b3a955 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)
}
/* Include the pseudo-PHY address and the broadcast PHY address to
- * divert reads towards our workaround
+ * divert reads towards our workaround. This is only required for
+ * 7445D0, since 7445E0 disconnects the internal switch pseudo-PHY such
+ * that we can use the regular SWITCH_MDIO master controller instead.
+ *
+ * By default, DSA initializes ds->phys_mii_mask to ds->phys_port_mask
+ * to have a 1:1 mapping between Port address and PHY address in order
+ * to utilize the slave_mii_bus instance to read from Port PHYs. This is
+ * not what we want here, so we initialize phys_mii_mask 0 to always
+ * utilize the "master" MDIO bus backed by the "mdio-unimac" driver.
*/
- ds->phys_mii_mask |= ((1 << BRCM_PSEUDO_PHY_ADDR) | (1 << 0));
+ if (of_machine_is_compatible("brcm,bcm7445d0"))
+ ds->phys_mii_mask |= ((1 << BRCM_PSEUDO_PHY_ADDR) | (1 << 0));
+ else
+ ds->phys_mii_mask = 0;
rev = reg_readl(priv, REG_SWITCH_REVISION);
priv->hw_params.top_rev = (rev >> SWITCH_TOP_REV_SHIFT) &