Lines Matching refs:pcs
66 static int tse_pcs_reset(void __iomem *base, struct tse_pcs *pcs) in tse_pcs_reset() argument
84 dev_err(pcs->dev, "PCS could not get out of sw reset\n"); in tse_pcs_reset()
91 int tse_pcs_init(void __iomem *base, struct tse_pcs *pcs) in tse_pcs_init() argument
102 ret = tse_pcs_reset(base, pcs); in tse_pcs_init()
105 pcs->sgmii_adapter_base + SGMII_ADAPTER_CTRL_REG); in tse_pcs_init()
110 static void pcs_link_timer_callback(struct tse_pcs *pcs) in pcs_link_timer_callback() argument
113 void __iomem *tse_pcs_base = pcs->tse_pcs_base; in pcs_link_timer_callback()
114 void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base; in pcs_link_timer_callback()
120 dev_dbg(pcs->dev, "Adapter: Link is established\n"); in pcs_link_timer_callback()
124 mod_timer(&pcs->aneg_link_timer, jiffies + in pcs_link_timer_callback()
129 static void auto_nego_timer_callback(struct tse_pcs *pcs) in auto_nego_timer_callback() argument
134 void __iomem *tse_pcs_base = pcs->tse_pcs_base; in auto_nego_timer_callback()
135 void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base; in auto_nego_timer_callback()
141 dev_dbg(pcs->dev, "Adapter: Auto Negotiation is completed\n"); in auto_nego_timer_callback()
148 dev_dbg(pcs->dev, in auto_nego_timer_callback()
152 dev_dbg(pcs->dev, in auto_nego_timer_callback()
156 dev_dbg(pcs->dev, in auto_nego_timer_callback()
160 dev_err(pcs->dev, in auto_nego_timer_callback()
164 dev_err(pcs->dev, in auto_nego_timer_callback()
168 dev_err(pcs->dev, in auto_nego_timer_callback()
171 dev_err(pcs->dev, in auto_nego_timer_callback()
185 tse_pcs_reset(tse_pcs_base, pcs); in auto_nego_timer_callback()
186 mod_timer(&pcs->aneg_link_timer, jiffies + in auto_nego_timer_callback()
193 struct tse_pcs *pcs = from_timer(pcs, t, aneg_link_timer); in aneg_link_timer_callback() local
195 if (pcs->autoneg == AUTONEG_ENABLE) in aneg_link_timer_callback()
196 auto_nego_timer_callback(pcs); in aneg_link_timer_callback()
197 else if (pcs->autoneg == AUTONEG_DISABLE) in aneg_link_timer_callback()
198 pcs_link_timer_callback(pcs); in aneg_link_timer_callback()
201 void tse_pcs_fix_mac_speed(struct tse_pcs *pcs, struct phy_device *phy_dev, in tse_pcs_fix_mac_speed() argument
204 void __iomem *tse_pcs_base = pcs->tse_pcs_base; in tse_pcs_fix_mac_speed()
205 void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base; in tse_pcs_fix_mac_speed()
211 pcs->autoneg = phy_dev->autoneg; in tse_pcs_fix_mac_speed()
225 tse_pcs_reset(tse_pcs_base, pcs); in tse_pcs_fix_mac_speed()
227 timer_setup(&pcs->aneg_link_timer, aneg_link_timer_callback, in tse_pcs_fix_mac_speed()
229 mod_timer(&pcs->aneg_link_timer, jiffies + in tse_pcs_fix_mac_speed()
258 tse_pcs_reset(tse_pcs_base, pcs); in tse_pcs_fix_mac_speed()
260 timer_setup(&pcs->aneg_link_timer, aneg_link_timer_callback, in tse_pcs_fix_mac_speed()
262 mod_timer(&pcs->aneg_link_timer, jiffies + in tse_pcs_fix_mac_speed()