diff options
author | Chris Packham | 2018-12-04 19:54:30 +1300 |
---|---|---|
committer | Joe Hershberger | 2019-01-24 11:35:29 -0600 |
commit | 92f129f4a098a47bbf889ea31e94edaa16edf256 (patch) | |
tree | 1cc94792a41799604d60432d76f2fa57a8351756 | |
parent | 3b4cda34d48ab997e788be5fb9cbd5151f1e7c2e (diff) |
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.
Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r-- | drivers/net/mvgbe.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c index 74fed7abd83..037e59ec6e3 100644 --- a/drivers/net/mvgbe.c +++ b/drivers/net/mvgbe.c @@ -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; |