summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorHannes Schmelzer <oe5hpm@oevsv.at>2016-06-22 10:07:14 (GMT)
committerStefano Babic <sbabic@denx.de>2016-07-12 15:58:48 (GMT)
commit0750701a3f74e831b6cb0ecc69be2f7eff94e819 (patch)
tree126f6e9deb958fd687ca55cdaf3ff39bc13ee1b3 /drivers/net
parenta32b4a03c717e37561505297a39ed02313e654af (diff)
downloadu-boot-0750701a3f74e831b6cb0ecc69be2f7eff94e819.tar.xz
driver/net/fec: support fixed speed connection
If MAC is directly connected to another MAC (like a switch for example) we don't need to probe for a phy, autoneogation and so on. We simply have to setup speed. Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/fec_mxc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 360f8e4..e871b3e 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -233,6 +233,7 @@ static int miiphy_restart_aneg(struct eth_device *dev)
return ret;
}
+#ifndef CONFIG_FEC_FIXED_SPEED
static int miiphy_wait_aneg(struct eth_device *dev)
{
uint32_t start;
@@ -260,6 +261,7 @@ static int miiphy_wait_aneg(struct eth_device *dev)
return 0;
}
+#endif /* CONFIG_FEC_FIXED_SPEED */
#endif
static int fec_rx_task_enable(struct fec_priv *fec)
@@ -502,6 +504,8 @@ static int fec_open(struct eth_device *edev)
}
speed = fec->phydev->speed;
}
+#elif CONFIG_FEC_FIXED_SPEED
+ speed = CONFIG_FEC_FIXED_SPEED;
#else
miiphy_wait_aneg(edev);
speed = miiphy_speed(edev->name, fec->phy_id);