Lines Matching refs:p
83 uint16_t phy_value, struct eth_cyclonev_priv *p);
85 uint16_t *rdval, struct eth_cyclonev_priv *p);
87 uint16_t phy_value, struct eth_cyclonev_priv *p);
89 uint16_t *rdval, struct eth_cyclonev_priv *p);
90 int alt_eth_phy_config(uint16_t instance, struct eth_cyclonev_priv *p);
91 int alt_eth_phy_reset(uint16_t instance, struct eth_cyclonev_priv *p);
93 uint16_t instance, struct eth_cyclonev_priv *p);
96 uint16_t phy_value, struct eth_cyclonev_priv *p) in alt_eth_phy_write_register() argument
122 sys_write32(phy_value & 0xffff, EMAC_GMAC_GMII_DATA_ADDR(p->base_addr)); in alt_eth_phy_write_register()
124 sys_write32(tmpreg & 0xffff, EMAC_GMAC_GMII_ADDR_ADDR(p->base_addr)); in alt_eth_phy_write_register()
130 tmpreg = sys_read32(EMAC_GMAC_GMII_ADDR_ADDR(p->base_addr)); in alt_eth_phy_write_register()
143 struct eth_cyclonev_priv *p) in alt_eth_phy_read_register() argument
169 sys_write32(tmpreg & 0xffff, EMAC_GMAC_GMII_ADDR_ADDR(p->base_addr)); in alt_eth_phy_read_register()
174 tmpreg = sys_read32(EMAC_GMAC_GMII_ADDR_ADDR(p->base_addr)); in alt_eth_phy_read_register()
183 *rdval = sys_read32(EMAC_GMAC_GMII_DATA_ADDR(p->base_addr)); in alt_eth_phy_read_register()
189 uint16_t phy_value, struct eth_cyclonev_priv *p) in alt_eth_phy_write_register_extended() argument
194 KSZPHY_EXTREG_WRITE | phy_reg, p); in alt_eth_phy_write_register_extended()
200 rc = alt_eth_phy_write_register(emac_instance, MII_KSZPHY_EXTREG_WRITE, phy_value, p); in alt_eth_phy_write_register_extended()
205 struct eth_cyclonev_priv *p) in alt_eth_phy_read_register_extended() argument
209 rc = alt_eth_phy_write_register(emac_instance, MII_KSZPHY_EXTREG, phy_reg, p); in alt_eth_phy_read_register_extended()
216 rc = alt_eth_phy_read_register(emac_instance, MII_KSZPHY_EXTREG_READ, rdval, p); in alt_eth_phy_read_register_extended()
221 int alt_eth_phy_config(uint16_t instance, struct eth_cyclonev_priv *p) in alt_eth_phy_config() argument
230 PHY_CLK_AND_CONTROL_PAD_SKEW_VALUE, p); in alt_eth_phy_config()
236 PHY_RX_DATA_PAD_SKEW_VALUE, p); in alt_eth_phy_config()
244 rc = alt_eth_phy_read_register(instance, PHY_BSR, &rdval, p); in alt_eth_phy_config()
252 rc = alt_eth_phy_read_register(instance, PHY_AUTON, &rdval, p); in alt_eth_phy_config()
259 rc = alt_eth_phy_write_register(instance, PHY_AUTON, rdval, p); in alt_eth_phy_config()
269 , p); in alt_eth_phy_config()
278 rc = alt_eth_phy_read_register(instance, PHY_BSR, &rdval, p); in alt_eth_phy_config()
289 rc = alt_eth_phy_read_register(instance, PHY_BCR, &rdval, p); 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()
310 alt_eth_phy_read_register(instance, PHY_BSR, &rdval, p); in alt_eth_phy_config()
319 int alt_eth_phy_reset(uint16_t instance, struct eth_cyclonev_priv *p) in alt_eth_phy_reset() argument
326 if ((alt_eth_phy_write_register(instance, PHY_BCR, PHY_RESET, p)) != 0) { in alt_eth_phy_reset()
334 rc = alt_eth_phy_read_register(instance, PHY_BCR, &rdval, p); in alt_eth_phy_reset()
350 uint16_t instance, struct eth_cyclonev_priv *p) in alt_eth_phy_get_duplex_and_speed() argument
357 rc = alt_eth_phy_read_register(instance, PHY_CR, ®val, p); in alt_eth_phy_get_duplex_and_speed()