> + /* FIXME: get from MDIO handle */
> + ret = of_property_read_u32(np, "phy", &val);
> + if (ret) {
> + dev_err(dev, "no phy\n");
> + return NULL;
> + }
> + plat->phy = val;
Hi Linus
You might want to work on the MDIO code first. It is O.K. to do
something like:
np = NULL;
if (dev->of_node)
np = of_get_child_by_name(dev->of_node, "mdio");
of_mdiobus_register(np, mdio_bus)
If np is NULL, it will fall back to mdiobus_register().
Then here you can do the correct
priv->phy_node = of_parse_phandle(dev->of_node, "phy-handle", 0);
and later call
phy = of_phy_connect(ndev, priv->phy_node, &ixp4xx_adjust_link,
PHY_INTERFACE_MODE_MII);
You just need to watch out for the -EPROBE_DEFFERED.
Andrew