Lines Matching refs:rdval
85 uint16_t *rdval, struct eth_cyclonev_priv *p);
89 uint16_t *rdval, struct eth_cyclonev_priv *p);
142 int alt_eth_phy_read_register(uint16_t emac_instance, uint16_t phy_reg, uint16_t *rdval, in alt_eth_phy_read_register() argument
183 *rdval = sys_read32(EMAC_GMAC_GMII_DATA_ADDR(p->base_addr)); in alt_eth_phy_read_register()
204 int alt_eth_phy_read_register_extended(uint16_t emac_instance, uint16_t phy_reg, uint16_t *rdval, in alt_eth_phy_read_register_extended() argument
216 rc = alt_eth_phy_read_register(emac_instance, MII_KSZPHY_EXTREG_READ, rdval, p); in alt_eth_phy_read_register_extended()
225 uint16_t rdval; in alt_eth_phy_config() local
244 rc = alt_eth_phy_read_register(instance, PHY_BSR, &rdval, p); in alt_eth_phy_config()
245 if (((rdval & PHY_AUTOCAP) == 0) || (rc == -1)) { in alt_eth_phy_config()
252 rc = alt_eth_phy_read_register(instance, PHY_AUTON, &rdval, p); in alt_eth_phy_config()
257 rdval |= (PHYANA_10BASET | PHYANA_10BASETFD | PHYANA_100BASETX | PHYANA_100BASETXFD | in alt_eth_phy_config()
259 rc = alt_eth_phy_write_register(instance, PHY_AUTON, rdval, p); in alt_eth_phy_config()
278 rc = alt_eth_phy_read_register(instance, PHY_BSR, &rdval, p); in alt_eth_phy_config()
279 } while (!(rdval & PHY_LINKED_STATUS) && (timeout < PHY_READ_TO) && (rc == 0)); in alt_eth_phy_config()
289 rc = alt_eth_phy_read_register(instance, PHY_BCR, &rdval, p); in alt_eth_phy_config()
294 rdval |= PHY_AUTONEGOTIATION; in alt_eth_phy_config()
295 rdval |= PHY_RESTART_AUTONEGOTIATION; in alt_eth_phy_config()
296 rc = alt_eth_phy_write_register(instance, PHY_BCR, rdval, p); in alt_eth_phy_config()
305 rc = alt_eth_phy_read_register(instance, PHY_BSR, &rdval, p); in alt_eth_phy_config()
306 } while (!(rdval & PHY_AUTONEGO_COMPLETE) && (timeout < PHY_READ_TO) && (rc == 0)); in alt_eth_phy_config()
310 alt_eth_phy_read_register(instance, PHY_BSR, &rdval, p); in alt_eth_phy_config()
311 LOG_ERR("Auto Negotiation: Status reg = 0x%x\n", rdval); in alt_eth_phy_config()
323 uint16_t rdval; in alt_eth_phy_reset() local
334 rc = alt_eth_phy_read_register(instance, PHY_BCR, &rdval, p); in alt_eth_phy_reset()
335 if (((rdval & PHY_RESET) == 0) || (rc == -1)) { in alt_eth_phy_reset()