Lines Matching refs:phydev
37 static int bcm87xx_of_reg_init(struct phy_device *phydev) in bcm87xx_of_reg_init() argument
43 if (!phydev->dev.of_node) in bcm87xx_of_reg_init()
46 paddr = of_get_property(phydev->dev.of_node, in bcm87xx_of_reg_init()
64 val = phy_read(phydev, regnum); in bcm87xx_of_reg_init()
73 ret = phy_write(phydev, regnum, val); in bcm87xx_of_reg_init()
81 static int bcm87xx_of_reg_init(struct phy_device *phydev) in bcm87xx_of_reg_init() argument
87 static int bcm87xx_config_init(struct phy_device *phydev) in bcm87xx_config_init() argument
89 phydev->supported = SUPPORTED_10000baseR_FEC; in bcm87xx_config_init()
90 phydev->advertising = ADVERTISED_10000baseR_FEC; in bcm87xx_config_init()
91 phydev->state = PHY_NOLINK; in bcm87xx_config_init()
92 phydev->autoneg = AUTONEG_DISABLE; in bcm87xx_config_init()
94 bcm87xx_of_reg_init(phydev); in bcm87xx_config_init()
99 static int bcm87xx_config_aneg(struct phy_device *phydev) in bcm87xx_config_aneg() argument
104 static int bcm87xx_read_status(struct phy_device *phydev) in bcm87xx_read_status() argument
110 rx_signal_detect = phy_read(phydev, BCM87XX_PMD_RX_SIGNAL_DETECT); in bcm87xx_read_status()
117 pcs_status = phy_read(phydev, BCM87XX_10GBASER_PCS_STATUS); in bcm87xx_read_status()
124 xgxs_lane_status = phy_read(phydev, BCM87XX_XGXS_LANE_STATUS); in bcm87xx_read_status()
131 phydev->speed = 10000; in bcm87xx_read_status()
132 phydev->link = 1; in bcm87xx_read_status()
133 phydev->duplex = 1; in bcm87xx_read_status()
137 phydev->link = 0; in bcm87xx_read_status()
141 static int bcm87xx_config_intr(struct phy_device *phydev) in bcm87xx_config_intr() argument
145 reg = phy_read(phydev, BCM87XX_LASI_CONTROL); in bcm87xx_config_intr()
150 if (phydev->interrupts == PHY_INTERRUPT_ENABLED) in bcm87xx_config_intr()
155 err = phy_write(phydev, BCM87XX_LASI_CONTROL, reg); in bcm87xx_config_intr()
159 static int bcm87xx_did_interrupt(struct phy_device *phydev) in bcm87xx_did_interrupt() argument
163 reg = phy_read(phydev, BCM87XX_LASI_STATUS); in bcm87xx_did_interrupt()
166 dev_err(&phydev->dev, in bcm87xx_did_interrupt()
173 static int bcm87xx_ack_interrupt(struct phy_device *phydev) in bcm87xx_ack_interrupt() argument
176 bcm87xx_did_interrupt(phydev); in bcm87xx_ack_interrupt()
180 static int bcm8706_match_phy_device(struct phy_device *phydev) in bcm8706_match_phy_device() argument
182 return phydev->c45_ids.device_ids[4] == PHY_ID_BCM8706; in bcm8706_match_phy_device()
185 static int bcm8727_match_phy_device(struct phy_device *phydev) in bcm8727_match_phy_device() argument
187 return phydev->c45_ids.device_ids[4] == PHY_ID_BCM8727; in bcm8727_match_phy_device()