Lines Matching refs:pcs

8 #include <linux/pcs-lynx.h>
24 struct phylink_pcs pcs;
35 #define phylink_pcs_to_lynx(pl_pcs) container_of((pl_pcs), struct lynx_pcs, pcs)
36 #define lynx_to_phylink_pcs(lynx) (&(lynx)->pcs)
38 static void lynx_pcs_get_state_usxgmii(struct mdio_device *pcs,
41 struct mii_bus *bus = pcs->bus;
42 int addr = pcs->addr;
61 static void lynx_pcs_get_state_2500basex(struct mdio_device *pcs,
66 bmsr = mdiodev_read(pcs, MII_BMSR);
67 lpa = mdiodev_read(pcs, MII_LPA);
83 static void lynx_pcs_get_state(struct phylink_pcs *pcs,
86 struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs);
115 static int lynx_pcs_config_giga(struct mdio_device *pcs,
129 mdiodev_write(pcs, LINK_TIMER_LO, link_timer & 0xffff);
130 mdiodev_write(pcs, LINK_TIMER_HI, link_timer >> 16);
142 err = mdiodev_modify(pcs, IF_MODE,
148 return phylink_mii_c22_pcs_config(pcs, interface, advertising,
152 static int lynx_pcs_config_usxgmii(struct mdio_device *pcs,
156 struct mii_bus *bus = pcs->bus;
157 int addr = pcs->addr;
160 dev_err(&pcs->dev, "USXGMII only supports in-band AN for now\n");
171 static int lynx_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
175 struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs);
203 static void lynx_pcs_an_restart(struct phylink_pcs *pcs)
205 struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs);
210 static void lynx_pcs_link_up_sgmii(struct mdio_device *pcs,
239 dev_err(&pcs->dev, "Invalid PCS speed %d\n", speed);
244 mdiodev_modify(pcs, IF_MODE,
265 static void lynx_pcs_link_up_2500basex(struct mdio_device *pcs,
272 dev_err(&pcs->dev, "AN not supported for 2500BaseX\n");
280 mdiodev_modify(pcs, IF_MODE,
285 static void lynx_pcs_link_up(struct phylink_pcs *pcs, unsigned int neg_mode,
289 struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs);
326 lynx->pcs.ops = &lynx_pcs_phylink_ops;
327 lynx->pcs.neg_mode = true;
328 lynx->pcs.poll = true;
336 struct phylink_pcs *pcs;
342 pcs = lynx_pcs_create(mdio);
352 return pcs;
369 struct phylink_pcs *pcs;
378 pcs = lynx_pcs_create(mdio);
388 return pcs;
392 void lynx_pcs_destroy(struct phylink_pcs *pcs)
394 struct lynx_pcs *lynx = phylink_pcs_to_lynx(pcs);