diff options
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.h')
| -rw-r--r-- | drivers/net/dsa/microchip/ksz_common.h | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/drivers/net/dsa/microchip/ksz_common.h b/drivers/net/dsa/microchip/ksz_common.h index ee7db46e469d..5f0a628b9849 100644 --- a/drivers/net/dsa/microchip/ksz_common.h +++ b/drivers/net/dsa/microchip/ksz_common.h @@ -22,6 +22,7 @@  /* all KSZ switches count ports from 1 */  #define KSZ_PORT_1 0  #define KSZ_PORT_2 1 +#define KSZ_PORT_4 3  struct ksz_device;  struct ksz_port; @@ -637,6 +638,12 @@ static inline int is_lan937x(struct ksz_device *dev)  		dev->chip_id == LAN9374_CHIP_ID;  } +static inline bool is_lan937x_tx_phy(struct ksz_device *dev, int port) +{ +	return (dev->chip_id == LAN9371_CHIP_ID || +		dev->chip_id == LAN9372_CHIP_ID) && port == KSZ_PORT_4; +} +  /* STP State Defines */  #define PORT_TX_ENABLE			BIT(2)  #define PORT_RX_ENABLE			BIT(1) |