phy: Add an mdio_device structure
Not all devices attached to an MDIO bus are phys. So add an mdio_device structure to represent the generic parts of an mdio device, and place this structure into the phy_device. Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
e7f4dc3536
commit
e5a03bfd87
@@ -2050,7 +2050,8 @@ static int cpsw_probe_dt(struct cpsw_priv *priv,
|
||||
if (!phy_dev)
|
||||
return -ENODEV;
|
||||
snprintf(slave_data->phy_id, sizeof(slave_data->phy_id),
|
||||
PHY_ID_FMT, phy_dev->bus->id, phy_dev->addr);
|
||||
PHY_ID_FMT, phy_dev->mdio.bus->id,
|
||||
phy_dev->mdio.addr);
|
||||
} else if (parp) {
|
||||
u32 phyid;
|
||||
struct device_node *mdio_node;
|
||||
|
@@ -396,7 +396,7 @@ static int davinci_mdio_probe(struct platform_device *pdev)
|
||||
phy = data->bus->phy_map[addr];
|
||||
if (phy) {
|
||||
dev_info(dev, "phy[%d]: device %s, driver %s\n",
|
||||
phy->addr, phydev_name(phy),
|
||||
phy->mdio.addr, phydev_name(phy),
|
||||
phy->drv ? phy->drv->name : "unknown");
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user