Lines Matching full:pcs

13 #include <linux/pcs/pcs-mtk-lynxi.h>
72 * @dev: Pointer to device owning the PCS
75 * @pcs: Phylink PCS structure
82 struct phylink_pcs pcs; member
86 static struct mtk_pcs_lynxi *pcs_to_mtk_pcs_lynxi(struct phylink_pcs *pcs) in pcs_to_mtk_pcs_lynxi() argument
88 return container_of(pcs, struct mtk_pcs_lynxi, pcs); in pcs_to_mtk_pcs_lynxi()
91 static unsigned int mtk_pcs_lynxi_inband_caps(struct phylink_pcs *pcs, in mtk_pcs_lynxi_inband_caps() argument
107 static void mtk_pcs_lynxi_get_state(struct phylink_pcs *pcs, in mtk_pcs_lynxi_get_state() argument
111 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_get_state()
123 static int mtk_pcs_lynxi_config(struct phylink_pcs *pcs, unsigned int neg_mode, in mtk_pcs_lynxi_config() argument
128 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_config()
138 /* Clearing IF_MODE_BIT0 switches the PCS to BASE-X mode, and in mtk_pcs_lynxi_config()
167 /* Reset SGMII PCS state */ in mtk_pcs_lynxi_config()
221 static void mtk_pcs_lynxi_restart_an(struct phylink_pcs *pcs) in mtk_pcs_lynxi_restart_an() argument
223 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_restart_an()
228 static void mtk_pcs_lynxi_link_up(struct phylink_pcs *pcs, in mtk_pcs_lynxi_link_up() argument
233 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_link_up()
254 static void mtk_pcs_lynxi_disable(struct phylink_pcs *pcs) in mtk_pcs_lynxi_disable() argument
256 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_disable()
283 dev_err(dev, "unknown PCS device id %08x\n", id); in mtk_pcs_lynxi_create()
293 dev_err(dev, "unknown PCS device version %04x\n", ver); in mtk_pcs_lynxi_create()
297 dev_dbg(dev, "MediaTek LynxI SGMII PCS (id 0x%08x, ver 0x%04x)\n", id, in mtk_pcs_lynxi_create()
307 mpcs->pcs.ops = &mtk_pcs_lynxi_ops; in mtk_pcs_lynxi_create()
308 mpcs->pcs.neg_mode = true; in mtk_pcs_lynxi_create()
309 mpcs->pcs.poll = true; in mtk_pcs_lynxi_create()
312 __set_bit(PHY_INTERFACE_MODE_SGMII, mpcs->pcs.supported_interfaces); in mtk_pcs_lynxi_create()
313 __set_bit(PHY_INTERFACE_MODE_1000BASEX, mpcs->pcs.supported_interfaces); in mtk_pcs_lynxi_create()
314 __set_bit(PHY_INTERFACE_MODE_2500BASEX, mpcs->pcs.supported_interfaces); in mtk_pcs_lynxi_create()
316 return &mpcs->pcs; in mtk_pcs_lynxi_create()
320 void mtk_pcs_lynxi_destroy(struct phylink_pcs *pcs) in mtk_pcs_lynxi_destroy() argument
322 if (!pcs) in mtk_pcs_lynxi_destroy()
325 kfree(pcs_to_mtk_pcs_lynxi(pcs)); in mtk_pcs_lynxi_destroy()