mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 15:37:23 +00:00
net: nuvoton: fix build broken for use phy_get_interface_by_name
The original patch is use phy_get_interface_by_name to set interface. The new patch is use dev_read_phy_mode to replace it. Signed-off-by: Jim Liu <JJLIU0@nuvoton.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
parent
1db706edcd
commit
dd5f07eb6b
1 changed files with 4 additions and 4 deletions
|
@ -710,12 +710,12 @@ static int npcm750_eth_ofdata_to_platdata(struct udevice *dev)
|
|||
|
||||
pdata->phy_interface = -1;
|
||||
phy_mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "phy-mode", NULL);
|
||||
|
||||
if (phy_mode)
|
||||
pdata->phy_interface = phy_get_interface_by_name(phy_mode);
|
||||
if (pdata->phy_interface == -1) {
|
||||
printf("%s: Invalid PHY interface '%s'\n", __func__, phy_mode);
|
||||
pdata->phy_interface = dev_read_phy_mode(dev);
|
||||
|
||||
if (pdata->phy_interface == PHY_INTERFACE_MODE_NA)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pdata->max_speed = 0;
|
||||
cell = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "max-speed", NULL);
|
||||
|
|
Loading…
Reference in a new issue