
Hi Andy,
Extends the mii_dev structure to participate in a full-blown MDIO and PHY driver scheme. The mii_dev structure and miiphy calls are modified in such a way to allow the original mii command and miiphy infrastructure to work as before, but also to support a new set of APIs which allow (among other things) sharing of PHY driver code and 10G support
The mii command will continue to support normal PHY management functions (Clause 22 of 802.3), but will not be changed to support 10G (Clause 45).
The basic design is similar to PHY Lib from Linux, but simplified for U-Boot's network and driver infrastructure.
We now have MDIO drivers and PHY drivers
An MDIO driver provides: read write reset
A PHY driver provides: (optionally): probe config - initial setup, starting of auto-negotiation startup - waiting for AN, and reading link state shutdown - any cleanup needed
The ethernet drivers interact with the PHY Lib using these functions: phy_connect() phy_config() phy_startup() phy_shutdown()
Each PHY driver can be configured separately, or all at once using phylib_all_drivers.h (added in the patch which adds the drivers)
In the process, cleaned up a number of whitespace issues in miiphyutil.c
Signed-off-by: Andy Fleming afleming@freescale.com
- Fixed some sparse warnings/errors
- Changed headers for new files to GPL v2+
- Removed the unexplained 500ms delay after autonegotiation
Looks good, thanks!
Acked-by: Detlev Zundel dzu@denx.de
Cheers Detlev