Skip to content

Commit 3fc826f

Browse files
committed
Merge branch 'net-dsa-bcm_sf2-Additional-DT-changes'
Florian Fainelli says: ==================== net: dsa: bcm_sf2: Additional DT changes This patch series includes some additional changes to the bcm_sf2 in order to support the Device Tree firmwares provided on such platforms. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 9d33ffa + 0fa45ee commit 3fc826f

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

drivers/net/dsa/bcm_sf2.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,6 +457,7 @@ static void bcm_sf2_identify_ports(struct bcm_sf2_priv *priv,
457457
{
458458
struct device_node *port;
459459
unsigned int port_num;
460+
struct property *prop;
460461
phy_interface_t mode;
461462
int err;
462463

@@ -483,6 +484,16 @@ static void bcm_sf2_identify_ports(struct bcm_sf2_priv *priv,
483484

484485
if (of_property_read_bool(port, "brcm,use-bcm-hdr"))
485486
priv->brcm_tag_mask |= 1 << port_num;
487+
488+
/* Ensure that port 5 is not picked up as a DSA CPU port
489+
* flavour but a regular port instead. We should be using
490+
* devlink to be able to set the port flavour.
491+
*/
492+
if (port_num == 5 && priv->type == BCM7278_DEVICE_ID) {
493+
prop = of_find_property(port, "ethernet", NULL);
494+
if (prop)
495+
of_remove_property(port, prop);
496+
}
486497
}
487498
}
488499

@@ -527,7 +538,7 @@ static int bcm_sf2_mdio_register(struct dsa_switch *ds)
527538
* driver.
528539
*/
529540
if (of_machine_is_compatible("brcm,bcm7445d0"))
530-
priv->indir_phy_mask |= (1 << BRCM_PSEUDO_PHY_ADDR);
541+
priv->indir_phy_mask |= (1 << BRCM_PSEUDO_PHY_ADDR) | (1 << 0);
531542
else
532543
priv->indir_phy_mask = 0;
533544

0 commit comments

Comments
 (0)