Lines Matching refs:bus
24 return phy->bus->ops->read(phy->bus, phy->addr, msg->reg, &(msg->value), 4); in phy_device_read()
30 return phy->bus->ops->write(phy->bus, phy->addr, msg->reg, &(msg->value), 4); in phy_device_write()
100 struct mii_bus *bus = phydev->bus; in rt_phy_read() local
103 if(bus->read_c45) in rt_phy_read()
104 return bus->read_c45(bus, phydev->addr, devad, regnum); in rt_phy_read()
107 if( bus && bus->read ) in rt_phy_read()
108 return bus->read(bus, phydev->addr, devad, regnum); in rt_phy_read()
116 struct mii_bus *bus = phydev->bus; in rt_phy_write() local
119 if(bus->write_c45) in rt_phy_write()
120 return bus->write_c45(bus, phydev->addr, devad, regnum, val); in rt_phy_write()
122 if( bus && bus->write ) in rt_phy_write()
123 return bus->write(bus, phydev->addr, devad, regnum, val); in rt_phy_write()
276 struct rt_phy_device *rt_phy_device_create(struct mii_bus *bus, int addr, in rt_phy_device_create() argument
284 bus ? bus->name : "(null bus)", addr); in rt_phy_device_create()
301 dev->bus = bus; in rt_phy_device_create()
310 bus->phymap[addr] = dev; in rt_phy_device_create()
330 static int get_phy_id(struct mii_bus *bus, int addr, int devad, rt_uint32_t *phy_id) in get_phy_id() argument
334 phy_reg = bus->read(bus, addr, devad, RT_MII_PHYSID1); in get_phy_id()
341 phy_reg = bus->read(bus, addr, devad, RT_MII_PHYSID2); in get_phy_id()
360 static struct rt_phy_device *create_phy_by_mask(struct mii_bus *bus, unsigned int phy_mask,int deva… in create_phy_by_mask() argument
368 int r = get_phy_id(bus, addr, devad, &id); in create_phy_by_mask()
379 return rt_phy_device_create(bus, addr, id, is_c45); in create_phy_by_mask()
396 static struct rt_phy_device *rt_phydev_create_by_mask(struct mii_bus *bus, unsigned int phy_mask) in rt_phydev_create_by_mask() argument
418 phy = create_phy_by_mask(bus, phy_mask, devad[i]); in rt_phydev_create_by_mask()
426 struct rt_phy_device *rt_phy_find_by_mask(struct mii_bus *bus, unsigned int phy_mask) in rt_phy_find_by_mask() argument
431 if (bus->reset) in rt_phy_find_by_mask()
433 bus->reset(bus); in rt_phy_find_by_mask()
449 if (bus->phymap[addr]) in rt_phy_find_by_mask()
450 return bus->phymap[addr]; in rt_phy_find_by_mask()
455 phy = rt_phydev_create_by_mask(bus, phy_mask); in rt_phy_find_by_mask()
470 struct rt_phy_device *rt_phy_get_device(struct mii_bus *bus,struct rt_ofw_node *np, int addr,rt_phy… in rt_phy_get_device() argument
477 phy = rt_ofw_create_phy(bus,np,addr); in rt_phy_get_device()
480 phy = rt_phy_find_by_mask(bus,phy_mask); in rt_phy_get_device()
524 pdrv->parent.bus = &rt_phy_bus; in rt_phy_driver_register()