• Home
  • Raw
  • Download

Lines Matching refs:phy_addr

60 #define emac_gigabit_enable(phy_addr)	davinci_eth_gigabit_enable(phy_addr)  argument
62 #define emac_gigabit_enable(phy_addr) /* no gigabit to enable */ argument
72 static int gen_init_phy(int phy_addr);
73 static int gen_is_phy_connected(int phy_addr);
74 static int gen_get_link_speed(int phy_addr);
75 static int gen_auto_negotiate(int phy_addr);
206 int davinci_eth_phy_read(u_int8_t phy_addr, u_int8_t reg_num, u_int16_t *data) in davinci_eth_phy_read() argument
216 ((phy_addr & 0x1f) << 16), in davinci_eth_phy_read()
232 int davinci_eth_phy_write(u_int8_t phy_addr, u_int8_t reg_num, u_int16_t data) in davinci_eth_phy_write() argument
241 ((phy_addr & 0x1f) << 16) | in davinci_eth_phy_write()
253 static int gen_init_phy(int phy_addr) in gen_init_phy() argument
257 if (gen_get_link_speed(phy_addr)) { in gen_init_phy()
259 ret = gen_get_link_speed(phy_addr); in gen_init_phy()
265 static int gen_is_phy_connected(int phy_addr) in gen_is_phy_connected() argument
269 return davinci_eth_phy_read(phy_addr, MII_PHYSID1, &dummy); in gen_is_phy_connected()
283 static int gen_get_link_speed(int phy_addr) in gen_get_link_speed() argument
287 if (davinci_eth_phy_read(phy_addr, MII_STATUS_REG, &tmp) && in gen_get_link_speed()
291 davinci_eth_phy_read(phy_addr, MII_LPA, &tmp); in gen_get_link_speed()
320 static int gen_auto_negotiate(int phy_addr) in gen_auto_negotiate() argument
326 if (!davinci_eth_phy_read(phy_addr, MII_BMCR, &tmp)) in gen_auto_negotiate()
331 davinci_eth_phy_write(phy_addr, MII_BMCR, val); in gen_auto_negotiate()
333 if (!davinci_eth_phy_read(phy_addr, MII_ADVERTISE, &val)) in gen_auto_negotiate()
338 davinci_eth_phy_write(phy_addr, MII_ADVERTISE, val); in gen_auto_negotiate()
340 if (!davinci_eth_phy_read(phy_addr, MII_BMCR, &tmp)) in gen_auto_negotiate()
344 davinci_eth_phy_read(phy_addr, MII_CTRL1000, &val); in gen_auto_negotiate()
347 davinci_eth_phy_write(phy_addr, MII_CTRL1000, val); in gen_auto_negotiate()
348 davinci_eth_phy_read(phy_addr, MII_CTRL1000, &val); in gen_auto_negotiate()
353 davinci_eth_phy_write(phy_addr, MII_BMCR, tmp); in gen_auto_negotiate()
358 if (!davinci_eth_phy_read(phy_addr, MII_BMSR, &tmp)) in gen_auto_negotiate()
367 if (!davinci_eth_phy_read(phy_addr, MII_BMSR, &tmp)) in gen_auto_negotiate()
373 return(gen_get_link_speed(phy_addr)); in gen_auto_negotiate()
395 static void __attribute__((unused)) davinci_eth_gigabit_enable(int phy_addr) in davinci_eth_gigabit_enable() argument
399 if (davinci_eth_phy_read(phy_addr, 0, &data)) { in davinci_eth_gigabit_enable()