From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Wed, 06 Apr 2011 14:56:07 +0200 Subject: [U-Boot] [PATCH v2 4/6] Create PHY Lib for U-Boot In-Reply-To: <1302040794-19837-5-git-send-email-afleming@freescale.com> (Andy Fleming's message of "Tue, 5 Apr 2011 16:59:52 -0500") References: <1302040794-19837-1-git-send-email-afleming@freescale.com> <1302040794-19837-2-git-send-email-afleming@freescale.com> <1302040794-19837-3-git-send-email-afleming@freescale.com> <1302040794-19837-4-git-send-email-afleming@freescale.com> <1302040794-19837-5-git-send-email-afleming@freescale.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 > --- > * 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 Cheers Detlev -- Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. -- Bertrand Russell -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de