Lines Matching defs:phydev
22 * broadcom,c45-reg-init property stored in the of_node for the phydev.
34 static int bcm87xx_of_reg_init(struct phy_device *phydev)
40 if (!phydev->mdio.dev.of_node)
43 paddr = of_get_property(phydev->mdio.dev.of_node,
60 val = phy_read_mmd(phydev, devid, reg);
69 ret = phy_write_mmd(phydev, devid, reg, val);
77 static int bcm87xx_of_reg_init(struct phy_device *phydev)
83 static int bcm87xx_get_features(struct phy_device *phydev)
86 phydev->supported);
90 static int bcm87xx_config_init(struct phy_device *phydev)
92 return bcm87xx_of_reg_init(phydev);
95 static int bcm87xx_config_aneg(struct phy_device *phydev)
100 static int bcm87xx_read_status(struct phy_device *phydev)
106 rx_signal_detect = phy_read_mmd(phydev, MDIO_MMD_PMAPMD,
114 pcs_status = phy_read_mmd(phydev, MDIO_MMD_PCS,
122 xgxs_lane_status = phy_read_mmd(phydev, MDIO_MMD_PHYXS,
130 phydev->speed = 10000;
131 phydev->link = 1;
132 phydev->duplex = 1;
136 phydev->link = 0;
140 static int bcm87xx_config_intr(struct phy_device *phydev)
144 reg = phy_read_mmd(phydev, MDIO_MMD_PCS, BCM87XX_LASI_CONTROL);
149 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
150 err = phy_read_mmd(phydev, MDIO_MMD_PCS, BCM87XX_LASI_STATUS);
155 err = phy_write_mmd(phydev, MDIO_MMD_PCS,
159 err = phy_write_mmd(phydev, MDIO_MMD_PCS,
164 err = phy_read_mmd(phydev, MDIO_MMD_PCS, BCM87XX_LASI_STATUS);
170 static irqreturn_t bcm87xx_handle_interrupt(struct phy_device *phydev)
174 irq_status = phy_read(phydev, BCM87XX_LASI_STATUS);
176 phy_error(phydev);
183 phy_trigger_machine(phydev);
188 static int bcm8706_match_phy_device(struct phy_device *phydev)
190 return phydev->c45_ids.device_ids[4] == PHY_ID_BCM8706;
193 static int bcm8727_match_phy_device(struct phy_device *phydev)
195 return phydev->c45_ids.device_ids[4] == PHY_ID_BCM8727;