Lines Matching full:pcs

3  * Lynx PCS MDIO helpers
8 #include <linux/pcs-lynx.h>
10 #define SGMII_CLOCK_PERIOD_NS 8 /* PCS is clocked at 125 MHz */
31 #define phylink_pcs_to_lynx(pl_pcs) container_of((pl_pcs), struct lynx_pcs, pcs)
33 static void lynx_pcs_get_state_usxgmii(struct mdio_device *pcs, in lynx_pcs_get_state_usxgmii() argument
36 struct mii_bus *bus = pcs->bus; in lynx_pcs_get_state_usxgmii()
37 int addr = pcs->addr; in lynx_pcs_get_state_usxgmii()
56 static void lynx_pcs_get_state_2500basex(struct mdio_device *pcs, in lynx_pcs_get_state_2500basex() argument
59 struct mii_bus *bus = pcs->bus; in lynx_pcs_get_state_2500basex()
60 int addr = pcs->addr; in lynx_pcs_get_state_2500basex()
80 static void lynx_pcs_get_state(struct phylink_pcs *pcs, in lynx_pcs_get_state() argument
83 struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs); in lynx_pcs_get_state()
111 static int lynx_pcs_config_sgmii(struct mdio_device *pcs, unsigned int mode, in lynx_pcs_config_sgmii() argument
114 struct mii_bus *bus = pcs->bus; in lynx_pcs_config_sgmii()
115 int addr = pcs->addr; in lynx_pcs_config_sgmii()
136 return phylink_mii_c22_pcs_config(pcs, mode, PHY_INTERFACE_MODE_SGMII, in lynx_pcs_config_sgmii()
140 static int lynx_pcs_config_usxgmii(struct mdio_device *pcs, unsigned int mode, in lynx_pcs_config_usxgmii() argument
143 struct mii_bus *bus = pcs->bus; in lynx_pcs_config_usxgmii()
144 int addr = pcs->addr; in lynx_pcs_config_usxgmii()
147 dev_err(&pcs->dev, "USXGMII only supports in-band AN for now\n"); in lynx_pcs_config_usxgmii()
158 static int lynx_pcs_config(struct phylink_pcs *pcs, unsigned int mode, in lynx_pcs_config() argument
163 struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs); in lynx_pcs_config()
188 static void lynx_pcs_link_up_sgmii(struct mdio_device *pcs, unsigned int mode, in lynx_pcs_link_up_sgmii() argument
191 struct mii_bus *bus = pcs->bus; in lynx_pcs_link_up_sgmii()
193 int addr = pcs->addr; in lynx_pcs_link_up_sgmii()
195 /* The PCS needs to be configured manually only in lynx_pcs_link_up_sgmii()
218 dev_err(&pcs->dev, "Invalid PCS speed %d\n", speed); in lynx_pcs_link_up_sgmii()
244 static void lynx_pcs_link_up_2500basex(struct mdio_device *pcs, in lynx_pcs_link_up_2500basex() argument
248 struct mii_bus *bus = pcs->bus; in lynx_pcs_link_up_2500basex()
249 int addr = pcs->addr; in lynx_pcs_link_up_2500basex()
253 dev_err(&pcs->dev, "AN not supported for 2500BaseX\n"); in lynx_pcs_link_up_2500basex()
266 static void lynx_pcs_link_up(struct phylink_pcs *pcs, unsigned int mode, in lynx_pcs_link_up() argument
270 struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs); in lynx_pcs_link_up()
305 lynx_pcs->pcs.ops = &lynx_pcs_phylink_ops; in lynx_pcs_create()
306 lynx_pcs->pcs.poll = true; in lynx_pcs_create()
312 void lynx_pcs_destroy(struct lynx_pcs *pcs) in lynx_pcs_destroy() argument
314 kfree(pcs); in lynx_pcs_destroy()