[U-Boot] MDIO_DEVAD_NONE
Danny Gale
Daniel.Gale at coloradoengineeringinc.com
Fri Aug 1 04:15:47 CEST 2014
Hi all,
We are working on porting u-boot to a new board based around the
Freescale T4240. We also have a 10G BASE-T PHY on board. We're running
into some difficulty bringing up the XFI XGMII interface between the
T4240 and the PHY and verifying that it's set up correctly.
One of the things I've noticed is that the genphy functions use
MDIO_DEVAD_NONE, which is defined as -1 (0xFFFF as an int). When
truncated to 5 bits for an MDIO device address, that's 0x1F. That's not
generally a valid MDIO device address, is it?
Reads from this device address, like the one below from
genphy_update_link in drivers/net/phy/phy.c:216, return 0xFFFF since the
bus is pulled up and there's no driving source in the PHY:
mii_reg = phy_read(phydev, MDIO_DEVAD_NONE, MII_BMSR);
So, in this case, genphy_update_link will falsely report that the link
is up if there's no device at the 0x1F MDIO device address.
Is this the intended behavior?
Thanks,
Danny
More information about the U-Boot
mailing list