diff options
author | Rafał Miłecki <rafal@milecki.pl> | 2021-03-18 11:01:43 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-19 00:44:05 +0300 |
commit | 6859d91549341c2ad769d482de58129f080c0f04 (patch) | |
tree | 8e6a104892da4c10a192a40e7764e9b7390fc5e1 /drivers/net/dsa/bcm_sf2.c | |
parent | 55cfeb396965c3906a84d09a9c487d065e37773b (diff) | |
download | linux-6859d91549341c2ad769d482de58129f080c0f04.tar.xz |
net: dsa: bcm_sf2: fix BCM4908 RGMII reg(s)
BCM4908 has only 1 RGMII reg for controlling port 7.
Fixes: 73b7a6047971 ("net: dsa: bcm_sf2: support BCM4908's integrated switch")
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
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 | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/net/dsa/bcm_sf2.c b/drivers/net/dsa/bcm_sf2.c index 044972b7d118..7e0ca8012983 100644 --- a/drivers/net/dsa/bcm_sf2.c +++ b/drivers/net/dsa/bcm_sf2.c @@ -36,7 +36,12 @@ static u16 bcm_sf2_reg_rgmii_cntrl(struct bcm_sf2_priv *priv, int port) { switch (priv->type) { case BCM4908_DEVICE_ID: - /* TODO */ + switch (port) { + case 7: + return REG_RGMII_11_CNTRL; + default: + break; + } break; default: switch (port) { @@ -1223,9 +1228,7 @@ static const u16 bcm_sf2_4908_reg_offsets[] = { [REG_PHY_REVISION] = 0x14, [REG_SPHY_CNTRL] = 0x24, [REG_CROSSBAR] = 0xc8, - [REG_RGMII_0_CNTRL] = 0xe0, - [REG_RGMII_1_CNTRL] = 0xec, - [REG_RGMII_2_CNTRL] = 0xf8, + [REG_RGMII_11_CNTRL] = 0x014c, [REG_LED_0_CNTRL] = 0x40, [REG_LED_1_CNTRL] = 0x4c, [REG_LED_2_CNTRL] = 0x58, |