Lines Matching refs:addr

646 static struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
657 bus->name, addr);
668 dev->addr = addr;
676 bus->phymap[addr] = dev;
682 * get_phy_id - reads the specified addr for its ID.
684 * @addr: PHY address on the MII bus
687 * Description: Reads the ID registers of the PHY at @addr on the
690 int __weak get_phy_id(struct mii_dev *bus, int addr, int devad, u32 *phy_id)
696 phy_reg = bus->read(bus, addr, devad, MII_PHYSID1);
705 phy_reg = bus->read(bus, addr, devad, MII_PHYSID2);
721 int addr = ffs(phy_mask) - 1;
722 int r = get_phy_id(bus, addr, devad, &phy_id);
725 return phy_device_create(bus, addr, phy_id, interface);
727 phy_mask &= ~(1 << addr);
737 int addr = ffs(phy_mask) - 1;
738 if (bus->phymap[addr]) {
739 bus->phymap[addr]->interface = interface;
740 return bus->phymap[addr];
742 phy_mask &= ~(1 << addr);
772 int addr = ffs(phy_mask) - 1;
773 debug("%d ", addr);
774 phy_mask &= ~(1 << addr);
784 * @addr: PHY address on the MII bus
786 * Description: Reads the ID registers of the PHY at @addr on the
789 static struct phy_device *get_phy_device(struct mii_dev *bus, int addr,
792 return get_phy_device_by_mask(bus, 1 << addr, interface);
848 int miiphy_reset(const char *devname, unsigned char addr)
858 phydev = get_phy_device(bus, addr, PHY_INTERFACE_MODE_MII);
887 phydev->bus->name, phydev->addr,
894 struct phy_device *phy_connect(struct mii_dev *bus, int addr,
897 struct phy_device *phy_connect(struct mii_dev *bus, int addr,
907 printf("Could not get PHY for %s: addr %d\n", bus->name, addr);