Lines Matching refs:addr
469 static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
480 bus->name, addr);
492 dev->addr = addr;
500 bus->phymap[addr] = dev;
506 * get_phy_id - reads the specified addr for its ID.
508 * @addr: PHY address on the MII bus
511 * Description: Reads the ID registers of the PHY at @addr on the
514 static int get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
520 phy_reg = bus->read(bus, addr, devad, MII_PHYSID1);
528 phy_reg = bus->read(bus, addr, devad, MII_PHYSID2);
543 int addr = ffs(phy_mask) - 1;
544 int r = get_phy_id(bus, addr, devad, &phy_id);
549 return phy_device_create(bus, addr, phy_id, interface);
550 phy_mask &= ~(BIT(addr));
560 int addr = ffs(phy_mask) - 1;
561 if (bus->phymap[addr]) {
562 bus->phymap[addr]->interface = interface;
563 return bus->phymap[addr];
565 phy_mask &= ~(BIT(addr));
595 * @addr: PHY address on the MII bus
597 * Description: Reads the ID registers of the PHY at @addr on the
600 static struct phy_device *get_phy_device(struct mii_dev *bus, int addr,
603 return get_phy_device_by_mask(bus, BIT(addr), interface);
661 int miiphy_reset(const char *devname, unsigned char addr)
671 phydev = get_phy_device(bus, addr, PHY_INTERFACE_MODE_MII);
701 bus->name, phydev->addr, phydev->dev->name, dev->name);
713 struct phy_device *phy_connect(struct mii_dev *bus, int addr,
716 return phy_connect_by_mask(bus, BIT(addr), dev, interface);