Lines Matching refs:pcs
77 static int tse_pcs_reset(void __iomem *base, struct tse_pcs *pcs) in tse_pcs_reset() argument
95 dev_err(pcs->dev, "PCS could not get out of sw reset\n"); in tse_pcs_reset()
102 int tse_pcs_init(void __iomem *base, struct tse_pcs *pcs) in tse_pcs_init() argument
113 ret = tse_pcs_reset(base, pcs); in tse_pcs_init()
116 pcs->sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG); in tse_pcs_init()
121 static void pcs_link_timer_callback(struct tse_pcs *pcs) in pcs_link_timer_callback() argument
124 void __iomem *tse_pcs_base = pcs->tse_pcs_base; in pcs_link_timer_callback()
125 void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base; in pcs_link_timer_callback()
131 dev_dbg(pcs->dev, "Adapter: Link is established\n"); in pcs_link_timer_callback()
135 mod_timer(&pcs->aneg_link_timer, jiffies + in pcs_link_timer_callback()
140 static void auto_nego_timer_callback(struct tse_pcs *pcs) in auto_nego_timer_callback() argument
145 void __iomem *tse_pcs_base = pcs->tse_pcs_base; in auto_nego_timer_callback()
146 void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base; in auto_nego_timer_callback()
152 dev_dbg(pcs->dev, "Adapter: Auto Negotiation is completed\n"); in auto_nego_timer_callback()
159 dev_dbg(pcs->dev, in auto_nego_timer_callback()
163 dev_dbg(pcs->dev, in auto_nego_timer_callback()
167 dev_dbg(pcs->dev, in auto_nego_timer_callback()
171 dev_err(pcs->dev, in auto_nego_timer_callback()
175 dev_err(pcs->dev, in auto_nego_timer_callback()
179 dev_err(pcs->dev, in auto_nego_timer_callback()
182 dev_err(pcs->dev, in auto_nego_timer_callback()
196 tse_pcs_reset(tse_pcs_base, pcs); in auto_nego_timer_callback()
197 mod_timer(&pcs->aneg_link_timer, jiffies + in auto_nego_timer_callback()
204 struct tse_pcs *pcs = from_timer(pcs, t, aneg_link_timer); in aneg_link_timer_callback() local
206 if (pcs->autoneg == AUTONEG_ENABLE) in aneg_link_timer_callback()
207 auto_nego_timer_callback(pcs); in aneg_link_timer_callback()
208 else if (pcs->autoneg == AUTONEG_DISABLE) in aneg_link_timer_callback()
209 pcs_link_timer_callback(pcs); in aneg_link_timer_callback()
212 void tse_pcs_fix_mac_speed(struct tse_pcs *pcs, struct phy_device *phy_dev, in tse_pcs_fix_mac_speed() argument
215 void __iomem *tse_pcs_base = pcs->tse_pcs_base; in tse_pcs_fix_mac_speed()
216 void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base; in tse_pcs_fix_mac_speed()
222 pcs->autoneg = phy_dev->autoneg; in tse_pcs_fix_mac_speed()
236 tse_pcs_reset(tse_pcs_base, pcs); in tse_pcs_fix_mac_speed()
238 timer_setup(&pcs->aneg_link_timer, aneg_link_timer_callback, in tse_pcs_fix_mac_speed()
240 mod_timer(&pcs->aneg_link_timer, jiffies + in tse_pcs_fix_mac_speed()
269 tse_pcs_reset(tse_pcs_base, pcs); in tse_pcs_fix_mac_speed()
271 timer_setup(&pcs->aneg_link_timer, aneg_link_timer_callback, in tse_pcs_fix_mac_speed()
273 mod_timer(&pcs->aneg_link_timer, jiffies + in tse_pcs_fix_mac_speed()