Skip to content

Commit

Permalink
net: dsa: bcm_sf2: Also configure Port 5 for 2Gb/sec on 7278
Browse files Browse the repository at this point in the history
Either port 5 or port 8 can be used on a 7278 device, make sure that
port 5 also gets configured properly for 2Gb/sec in that case.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Feb 17, 2020
1 parent 3394651 commit 7458bd5
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/dsa/bcm_sf2.c
Original file line number Diff line number Diff line change
@@ -616,6 +616,9 @@ static void bcm_sf2_sw_mac_config(struct dsa_switch *ds, int port,
if (state->duplex == DUPLEX_FULL)
reg |= DUPLX_MODE;

if (priv->type == BCM7278_DEVICE_ID && dsa_is_cpu_port(ds, port))
reg |= GMIIP_SPEED_UP_2G;

core_writel(priv, reg, offset);
}

1 change: 1 addition & 0 deletions drivers/net/dsa/bcm_sf2_regs.h
Original file line number Diff line number Diff line change
@@ -178,6 +178,7 @@ enum bcm_sf2_reg_offs {
#define RXFLOW_CNTL (1 << 4)
#define TXFLOW_CNTL (1 << 5)
#define SW_OVERRIDE (1 << 6)
#define GMIIP_SPEED_UP_2G (1 << 7)

#define CORE_WATCHDOG_CTRL 0x001e4
#define SOFTWARE_RESET (1 << 7)

0 comments on commit 7458bd5

Please sign in to comment.