xref: /linux/drivers/net/dsa/mxl862xx/mxl862xx-phylink.h (revision b2128290c29902315e632ea59e0504d6bc9e9b42)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef __MXL862XX_PHYLINK_H
4 #define __MXL862XX_PHYLINK_H
5 
6 #include <linux/phylink.h>
7 
8 #include "mxl862xx.h"
9 
10 #define MXL862XX_SERDES_SLOT(port) \
11 	(((port) - MXL862XX_FIRST_SERDES_PORT) % MXL862XX_SERDES_SLOTS)
12 #define MXL862XX_SERDES_PORT_ID(port) \
13 	(((port) - MXL862XX_FIRST_SERDES_PORT) / MXL862XX_SERDES_SLOTS)
14 
15 extern const struct phylink_mac_ops mxl862xx_phylink_mac_ops;
16 void mxl862xx_phylink_get_caps(struct dsa_switch *ds, int port,
17 			       struct phylink_config *config);
18 void mxl862xx_setup_pcs(struct mxl862xx_priv *priv, struct mxl862xx_pcs *pcs,
19 			int port);
20 
21 #endif /* __MXL862XX_PHYLINK_H */
22