b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h |
| 2 | +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_dev_enet.h |
| 3 | @@ -79,6 +79,9 @@ struct bcm63xx_enetsw_port { |
| 4 | int force_speed; |
| 5 | int force_duplex_full; |
| 6 | |
| 7 | + int mii_override; |
| 8 | + int timing_sel; |
| 9 | + |
| 10 | const char *name; |
| 11 | }; |
| 12 | |
| 13 | --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c |
| 14 | +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c |
| 15 | @@ -2232,6 +2232,10 @@ static int bcm_enetsw_open(struct net_de |
| 16 | |
| 17 | rgmii_ctrl = enetsw_readb(priv, ENETSW_RGMII_CTRL_REG(i)); |
| 18 | rgmii_ctrl |= ENETSW_RGMII_CTRL_GMII_CLK_EN; |
| 19 | + if (priv->used_ports[i].mii_override) |
| 20 | + rgmii_ctrl |= ENETSW_RGMII_CTRL_MII_OVERRIDE_EN; |
| 21 | + if (priv->used_ports[i].timing_sel) |
| 22 | + rgmii_ctrl |= ENETSW_RGMII_CTRL_TIMING_SEL_EN; |
| 23 | enetsw_writeb(priv, rgmii_ctrl, ENETSW_RGMII_CTRL_REG(i)); |
| 24 | } |
| 25 | |