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 void mtk_pcs_lynxi_get_state(struct phylink_pcs *pcs, in mtk_pcs_lynxi_get_state() argument
94 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_get_state()
105 static int mtk_pcs_lynxi_config(struct phylink_pcs *pcs, unsigned int neg_mode, in mtk_pcs_lynxi_config() argument
110 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_config()
120 /* Clearing IF_MODE_BIT0 switches the PCS to BASE-X mode, and in mtk_pcs_lynxi_config()
149 /* Reset SGMII PCS state */ in mtk_pcs_lynxi_config()
203 static void mtk_pcs_lynxi_restart_an(struct phylink_pcs *pcs) in mtk_pcs_lynxi_restart_an() argument
205 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_restart_an()
210 static void mtk_pcs_lynxi_link_up(struct phylink_pcs *pcs, in mtk_pcs_lynxi_link_up() argument
215 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_link_up()
236 static void mtk_pcs_lynxi_disable(struct phylink_pcs *pcs) in mtk_pcs_lynxi_disable() argument
238 struct mtk_pcs_lynxi *mpcs = pcs_to_mtk_pcs_lynxi(pcs); in mtk_pcs_lynxi_disable()
264 dev_err(dev, "unknown PCS device id %08x\n", id); in mtk_pcs_lynxi_create()
274 dev_err(dev, "unknown PCS device version %04x\n", ver); in mtk_pcs_lynxi_create()
278 dev_dbg(dev, "MediaTek LynxI SGMII PCS (id 0x%08x, ver 0x%04x)\n", id, in mtk_pcs_lynxi_create()
288 mpcs->pcs.ops = &mtk_pcs_lynxi_ops; in mtk_pcs_lynxi_create()
289 mpcs->pcs.neg_mode = true; in mtk_pcs_lynxi_create()
290 mpcs->pcs.poll = true; in mtk_pcs_lynxi_create()
293 return &mpcs->pcs; in mtk_pcs_lynxi_create()
297 void mtk_pcs_lynxi_destroy(struct phylink_pcs *pcs) in mtk_pcs_lynxi_destroy() argument
299 if (!pcs) in mtk_pcs_lynxi_destroy()
302 kfree(pcs_to_mtk_pcs_lynxi(pcs)); in mtk_pcs_lynxi_destroy()