net: mvgbe: fallback phy-mode to GMII
PATCH 1/1 net: mvgbe: fallback phy-mode to GMII
Some existing device trees don't specify a phy-mode so fallback to GMII when a phy-mode is not provided.
---
This is similar to what the Linux mv643xx_eth.c network driver does to handle the same case.
drivers/net/mvgbe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/net/mvgbe.c +2 -4
@@ -1005,10 +1005,8 @@ static int mvgbe_ofdata_to_platdata(struct udevice *dev) phy_mode =fdt_getprop (gd->fdt_blob, pnode,"phy-mode" ,NULL );if (phy_mode) pdata->phy_interface =phy_get_interface_by_name (phy_mode); -if (pdata->phy_interface ==-1 ) { -debug ("%s: Invalid PHY interface '%s'\n" , __func__, phy_mode); -return -EINVAL ; - } +else + pdata->phy_interface =PHY_INTERFACE_MODE_GMII ; dmvgbe->phy_interface = pdata->phy_interface;
Signature · 1 line
2.19.2
PATCH 1/1 net: mvgbe: fallback phy-mode to GMII
Quoted 19 lines · Chris Packham
Some existing device trees don't specify a phy-mode so fallback to GMII when a phy-mode is not provided.
Signed-off-by Chris Packham <[email protected]>---
This is similar to what the Linuxmv643xx_eth.cnetwork driver does to handle the same case.drivers/net/mvgbe.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)drivers/net/mvgbe.c +0
-0@@ -1005,10 +1005,8 @@ static int mvgbe_ofdata_to_platdata(struct udevice *dev) phy_mode =fdt_getprop (gd->fdt_blob, pnode,"phy-mode" ,NULL );if (phy_mode)
drivers/net/mvgbe.c static int mvgbe_ofdata_to_platdata(struct udevice *dev) · line 1012
Quoted 10 lines
drivers/net/mvgbe.c +2
-4pdata->phy_interface =phy_get_interface_by_name (phy_mode); -if (pdata->phy_interface ==-1 ) { -debug ("%s: Invalid PHY interface '%s'\n" , __func__, phy_mode); -return -EINVAL ; - } + else + pdata->phy_interface = PHY_INTERFACE_MODE_GMII; dmvgbe->phy_interface = pdata->phy_interface;
Thanks,
Stefan
PATCH 1/1 net: mvgbe: fallback phy-mode to GMII
In reply to Chris PackhamQuoted 5 lines · Chris Packham
Some existing device trees don't specify a phy-mode so fallback to GMII when a phy-mode is not provided.
Signed-off-by Chris Packham <[email protected]>
Hi Chris,
https://patchwork.ozlabs.org/patch/1007466/ was applied to http://git.denx.de/?p=u-boot/u-boot-net.git
Thanks!
-Joe