Skip to content

Commit

Permalink
net: dsa: microchip: remove IS_9893 flag
Browse files Browse the repository at this point in the history
Use chip_id as other places of this code do it

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Oleksij Rempel authored and David S. Miller committed Aug 31, 2022
1 parent e7f6952 commit 32cbac2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
3 changes: 0 additions & 3 deletions drivers/net/dsa/microchip/ksz9477.c
Original file line number Diff line number Diff line change
Expand Up @@ -1164,9 +1164,6 @@ int ksz9477_switch_init(struct ksz_device *dev)
if (ret)
return ret;

if (dev->chip_id == KSZ9893_CHIP_ID)
dev->features |= IS_9893;

return 0;
}

Expand Down
3 changes: 2 additions & 1 deletion drivers/net/dsa/microchip/ksz_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1912,7 +1912,8 @@ static void ksz_set_xmii(struct ksz_device *dev, int port,
case PHY_INTERFACE_MODE_RGMII_RXID:
data8 |= bitval[P_RGMII_SEL];
/* On KSZ9893, disable RGMII in-band status support */
if (dev->features & IS_9893)
if (dev->chip_id == KSZ9893_CHIP_ID ||
dev->chip_id == KSZ8563_CHIP_ID)
data8 &= ~P_MII_MAC_MODE;
break;
default:
Expand Down
4 changes: 0 additions & 4 deletions drivers/net/dsa/microchip/ksz_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ struct ksz_device {
unsigned long mib_read_interval;
u16 mirror_rx;
u16 mirror_tx;
u32 features; /* chip specific features */
u16 port_mask;
};

Expand Down Expand Up @@ -542,9 +541,6 @@ static inline int is_lan937x(struct ksz_device *dev)

#define SW_START 0x01

/* Used with variable features to indicate capabilities. */
#define IS_9893 BIT(2)

/* xMII configuration */
#define P_MII_DUPLEX_M BIT(6)
#define P_MII_100MBIT_M BIT(4)
Expand Down

0 comments on commit 32cbac2

Please sign in to comment.