Lines Matching refs:sgmii_ofs
47 int netcp_sgmii_reset(void __iomem *sgmii_ofs, int port) in netcp_sgmii_reset() argument
50 sgmii_write_reg_bit(sgmii_ofs, SGMII_SRESET_REG(port), in netcp_sgmii_reset()
53 while ((sgmii_read_reg(sgmii_ofs, SGMII_SRESET_REG(port)) & in netcp_sgmii_reset()
61 bool netcp_sgmii_rtreset(void __iomem *sgmii_ofs, int port, bool set) in netcp_sgmii_rtreset() argument
67 reg = sgmii_read_reg(sgmii_ofs, SGMII_SRESET_REG(port)); in netcp_sgmii_rtreset()
73 sgmii_write_reg(sgmii_ofs, SGMII_SRESET_REG(port), reg); in netcp_sgmii_rtreset()
79 int netcp_sgmii_get_port_link(void __iomem *sgmii_ofs, int port) in netcp_sgmii_get_port_link() argument
83 status = sgmii_read_reg(sgmii_ofs, SGMII_STATUS_REG(port)); in netcp_sgmii_get_port_link()
89 int netcp_sgmii_config(void __iomem *sgmii_ofs, int port, u32 interface) in netcp_sgmii_config() argument
122 sgmii_write_reg(sgmii_ofs, SGMII_CTL_REG(port), 0); in netcp_sgmii_config()
127 status = sgmii_read_reg(sgmii_ofs, SGMII_STATUS_REG(port)); in netcp_sgmii_config()
135 sgmii_write_reg(sgmii_ofs, SGMII_MRADV_REG(port), mr_adv_ability); in netcp_sgmii_config()
136 sgmii_write_reg(sgmii_ofs, SGMII_CTL_REG(port), control); in netcp_sgmii_config()
144 status = sgmii_read_reg(sgmii_ofs, SGMII_STATUS_REG(port)); in netcp_sgmii_config()