Message ID | 1465204653-9213-1-git-send-email-sbabic@denx.de |
---|---|
State | Awaiting Upstream |
Delegated to: | Stefano Babic |
Headers | show |
On Mon, Jun 6, 2016 at 4:17 AM, Stefano Babic <sbabic@denx.de> wrote: > Sometimes the MII is not used at all - for example, > when the controller is connected to a switch with > a fixed speed, and the MDC/MDIO signal are used > for something else. > > Allow to set a fixed speed in the FEC driver > without relying on the autonegotiation. > > Signed-off-by: Stefano Babic <sbabic@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 88b247c..40795cf 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -502,10 +502,11 @@ static int fec_open(struct eth_device *edev) } speed = fec->phydev->speed; } +#ifdef CONFIG_FEC_FIXED_SPEED + speed = CONFIG_FEC_FIXED_SPEED; +#endif #else -#if 0 miiphy_wait_aneg(edev); -#endif speed = miiphy_speed(edev->name, fec->phy_id); miiphy_duplex(edev->name, fec->phy_id); #endif
Sometimes the MII is not used at all - for example, when the controller is connected to a switch with a fixed speed, and the MDC/MDIO signal are used for something else. Allow to set a fixed speed in the FEC driver without relying on the autonegotiation. Signed-off-by: Stefano Babic <sbabic@denx.de> --- The use case is the FEC connected to a Switch without using MDIO / MDC. The FEC has no way to get the speed. drivers/net/fec_mxc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)