mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
net: sun8i-emac: Add support for fixed-link phy
Make the "phy-handle" property optional, which allows support for a fixed-link phy configuration. Thus if the "phy-handle" is present in a DT, then driver will work as before. Otherwise, phyaddr initialization will not be necessary, as it is not needed in case of a fixed-link config. Signed-off-by: Maksim Kiselev <bigunclemax@gmail.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com> Reviewed-by: Andre Przywara <andre.przywara@arm.com>
This commit is contained in:
parent
1cca1011cb
commit
2bfab76f4c
1 changed files with 2 additions and 5 deletions
|
@ -833,10 +833,7 @@ static int sun8i_emac_eth_of_to_plat(struct udevice *dev)
|
|||
priv->use_internal_phy = false;
|
||||
|
||||
offset = fdtdec_lookup_phandle(gd->fdt_blob, node, "phy-handle");
|
||||
if (offset < 0) {
|
||||
debug("%s: Cannot find PHY address\n", __func__);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (offset >= 0)
|
||||
priv->phyaddr = fdtdec_get_int(gd->fdt_blob, offset, "reg", -1);
|
||||
|
||||
pdata->phy_interface = dev_read_phy_mode(dev);
|
||||
|
|
Loading…
Reference in a new issue