Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a/drivers/net/dsa/lantiq_gswip.c
- +++ b/drivers/net/dsa/lantiq_gswip.c
- @@ -392,17 +392,7 @@ static void gswip_mii_mask(struct gswip_priv *priv, u32 clear, u32 set,
- static void gswip_mii_mask_cfg(struct gswip_priv *priv, u32 clear, u32 set,
- int port)
- {
- - switch (port) {
- - case 0:
- - gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG0);
- - break;
- - case 1:
- - gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG1);
- - break;
- - case 5:
- - gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG5);
- - break;
- - }
- + gswip_mii_mask(priv, clear, set, GSWIP_MII_CFG0 + (port * 2));
- }
- static void gswip_mii_mask_pcdu(struct gswip_priv *priv, u32 clear, u32 set,
- @@ -1470,6 +1460,8 @@ static void gswip_phylink_mac_config(struct dsa_switch *ds, int port,
- case PHY_INTERFACE_MODE_MII:
- case PHY_INTERFACE_MODE_INTERNAL:
- miicfg |= GSWIP_MII_CFG_MODE_MIIM;
- + miicfg &= ~GSWIP_MII_CFG_RATE_MASK;
- + miicfg |= GSWIP_MII_CFG_RATE_M25;
- break;
- case PHY_INTERFACE_MODE_REVMII:
- miicfg |= GSWIP_MII_CFG_MODE_MIIP;
- @@ -1522,9 +1514,7 @@ static void gswip_phylink_mac_link_up(struct dsa_switch *ds, int port,
- {
- struct gswip_priv *priv = ds->priv;
- - /* Enable the xMII interface only for the external PHY */
- - if (interface != PHY_INTERFACE_MODE_INTERNAL)
- - gswip_mii_mask_cfg(priv, 0, GSWIP_MII_CFG_EN, port);
- + gswip_mii_mask_cfg(priv, 0, GSWIP_MII_CFG_EN, port);
- }
- static void gswip_get_strings(struct dsa_switch *ds, int port, u32 stringset,
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement