Lines Matching refs:addr

597 static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
608 bus->name, addr);
620 dev->addr = addr;
628 bus->phymap[addr] = dev;
634 * get_phy_id - reads the specified addr for its ID.
636 * @addr: PHY address on the MII bus
639 * Description: Reads the ID registers of the PHY at @addr on the
642 int __weak get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
648 phy_reg = bus->read(bus, addr, devad, MII_PHYSID1);
656 phy_reg = bus->read(bus, addr, devad, MII_PHYSID2);
671 int addr = ffs(phy_mask) - 1;
672 int r = get_phy_id(bus, addr, devad, &phy_id);
675 return phy_device_create(bus, addr, phy_id, interface);
676 phy_mask &= ~(1 << addr);
686 int addr = ffs(phy_mask) - 1;
687 if (bus->phymap[addr]) {
688 bus->phymap[addr]->interface = interface;
689 return bus->phymap[addr];
691 phy_mask &= ~(1 << addr);
718 int addr = ffs(phy_mask) - 1;
719 debug("%d ", addr);
720 phy_mask &= ~(1 << addr);
730 * @addr: PHY address on the MII bus
732 * Description: Reads the ID registers of the PHY at @addr on the
735 static struct phy_device *get_phy_device(struct mii_dev *bus, int addr,
738 return get_phy_device_by_mask(bus, 1 << addr, interface);
792 int miiphy_reset(const char *devname, unsigned char addr)
802 phydev = get_phy_device(bus, addr, PHY_INTERFACE_MODE_MII);
831 phydev->bus->name, phydev->addr,
839 struct phy_device *phy_connect(struct mii_dev *bus, int addr,
842 struct phy_device *phy_connect(struct mii_dev *bus, int addr,
848 phydev = phy_find_by_mask(bus, 1 << addr, interface);
852 printf("Could not get PHY for %s: addr %d\n", bus->name, addr);