u-boot-brain/drivers/net
Andy Fleming 5f184715ec Create PHY Lib for U-Boot
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
config_phylib_all_drivers.h (added in the patch which adds the drivers)

We also provide generic drivers for Clause 22 (10/100/1000), and
Clause 45 (10G) PHYs.

We also implement phy_reset(), and call it in phy_connect(). Because
phy_reset() is essentially the same as miiphy_reset, but:
a) must support 10G PHYs, and
b) should use the phylib primitives,

we implement miiphy_reset, using phy_reset(), but only when
CONFIG_PHYLIB is set. Otherwise, we just use the old version. In this
way, we save on compile size, even if we don't manage to save code size.

Pulled ethtool.h and mdio.h from:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
782d640afd15af7a1faf01cfe566ca4ac511319d
With many, many deletions so as to enable compilation under u-boot

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
2011-04-20 15:09:19 -05:00
..
phy Create PHY Lib for U-Boot 2011-04-20 15:09:19 -05:00
3c589.c drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
3c589.h Big white-space cleanup. 2008-05-21 00:14:08 +02:00
4xx_enet.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
5701rls.c drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
5701rls.h drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
8390.h drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
altera_tse.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
altera_tse.h miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
at91_emac.c Fix misc spelling errors found by lintian 2011-04-12 22:58:31 +02:00
ax88180.c AX88180: add support for the Marvell 88E1118 phy 2010-07-12 00:14:29 -07:00
ax88180.h AX88180: use standard I/O accessors 2010-07-12 00:14:29 -07:00
ax88796.c net: ne2000: Divided a function of NE2000 driver 2008-10-13 22:28:32 -07:00
ax88796.h NE2000: Fix regresssion introduced by e710185aae on non AX88796 2008-04-28 22:26:36 -07:00
bcm570x_autoneg.c drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
bcm570x_autoneg.h drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
bcm570x_bits.h drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
bcm570x_debug.h drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
bcm570x_lm.h bcm570x: get mac address from environment 2009-03-20 22:39:10 +01:00
bcm570x_mm.h drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
bcm570x_queue.h drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
bcm570x.c bcm570x: get mac address from environment 2009-03-20 22:39:10 +01:00
bfin_mac.c Blackfin: bfin_mac: convert from old style MMR macros 2010-10-02 16:00:37 -04:00
bfin_mac.h Blackfin: bfin_mac: hook up new write_hwaddr function 2010-05-03 14:52:50 -07:00
cs8900.c cs8900_initialize() cleanup 2010-01-31 22:34:33 -08:00
cs8900.h Convert CS8900 Ethernet driver to CONFIG_NET_MULTI API 2009-08-25 13:35:54 -07:00
davinci_emac.c ea20: fix undefined PHY_* errors 2011-04-11 21:28:44 +02:00
dc2114x.c net: dc2114x: Add initialized eth_device structure 2010-11-14 23:17:40 +01:00
designware.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
designware.h SPEAr : Network driver support added 2010-07-12 00:08:05 -07:00
dm9000x.c Remove instances of phy_read/write 2011-04-20 13:44:46 -05:00
dm9000x.h dm9000 remove dead external phy support, gpio fix 2008-08-26 23:08:19 -07:00
dnet.c Coding Style cleanup; update CHANGELOG 2009-02-22 01:19:52 +01:00
dnet.h dnet: driver for Dave DNET ethernet controller 2009-02-10 00:16:27 +01:00
e1000.c Net: Add Intel E1000 82574L PCIe card support 2011-04-11 22:20:13 +02:00
e1000.h Net: Add Intel E1000 82574L PCIe card support 2011-04-11 22:20:13 +02:00
eepro100.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
enc28j60_lpc2292.c NET: move legacy enc28j60.c to sidetrack as enc28j60_lpc2292.c 2010-10-11 22:47:48 -07:00
enc28j60.c Remove instances of phy_read/write 2011-04-20 13:44:46 -05:00
enc28j60.h NET: add ENC28J60 driver using SPI framework 2010-10-11 22:47:48 -07:00
ep93xx_eth.c miiphy: constify device name 2010-08-09 11:52:29 -07:00
ep93xx_eth.h Add EP93xx ethernet driver 2010-01-31 22:37:12 -08:00
ethoc.c net: ethoc: add write_hwaddr support 2010-05-03 14:52:50 -07:00
fec_mxc.c fec_mxc: add support for MX53 processor 2011-02-02 00:54:41 +01:00
fec_mxc.h fec_mxc: add support for MX53 processor 2011-02-02 00:54:41 +01:00
fsl_mcdmafec.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
ftgmac100.c ftgmac100: support of gigabit eth ftgmac100 2011-01-09 22:16:51 +01:00
ftgmac100.h ftgmac100: support of gigabit eth ftgmac100 2011-01-09 22:16:51 +01:00
ftmac100.c net: ftmac100: update get_timer() usages 2011-03-21 22:54:23 +01:00
ftmac100.h arm: A320: driver for FTMAC100 ethernet controller 2009-08-10 14:53:52 -07:00
greth.c GRETH: removed space in network driver device name. 2010-11-18 08:33:25 +01:00
greth.h SPARC/LEON3: Added GRETH Ethernet 10/100/1000 driver. 2008-03-30 00:33:28 -04:00
inca-ip_sw.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
ks8695eth.c drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
lan91c96.c NET: lan91c96: Correct chip detect logic 2011-01-18 23:58:35 +01:00
lan91c96.h NET: LAN91C96 CONFIG_NET_MULTIify 2009-12-13 21:31:26 -08:00
macb.c miiphy: constify device name 2010-08-09 11:52:29 -07:00
macb.h AT91CAP9 support : MACB changes 2008-02-14 09:37:58 +00:00
Makefile ftgmac100: support of gigabit eth ftgmac100 2011-01-09 22:16:51 +01:00
mcffec.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
mcfmii.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
mpc5xxx_fec.c mpc5xxx_fec: add call to reset_phy() after PHY initialization 2010-10-11 23:00:29 -07:00
mpc5xxx_fec.h Move MPC5xxx_FEC driver to drivers/net 2008-08-29 13:58:07 -06:00
mpc512x_fec.c miiphy: constify device name 2010-08-09 11:52:29 -07:00
mpc512x_fec.h MPC512x: remove include/mpc512x.h 2009-06-12 20:47:16 +02:00
mvgbe.c miiphy: constify device name 2010-08-09 11:52:29 -07:00
mvgbe.h mvgbe: add support for orion5x GbE controller 2010-07-12 23:40:31 -07:00
natsemi.c net: natsemi: Add initialized eth_device structure 2010-11-14 23:17:43 +01:00
ne2000_base.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
ne2000_base.h net: ne2000: Divided a function of NE2000 driver 2008-10-13 22:28:32 -07:00
ne2000.c net: ne2000: Add spport RTL-8019AS 2011-02-15 21:55:41 +01:00
ne2000.h NE2000: Fix regresssion introduced by e710185aae on non AX88796 2008-04-28 22:26:36 -07:00
netarm_eth.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
netarm_eth.h drivers/net : move net drivers to drivers/net 2007-11-25 18:35:17 +01:00
netconsole.c netconsole: mark local funcs with static 2010-01-18 00:21:49 +01:00
nicext.h Big white-space cleanup. 2008-05-21 00:14:08 +02:00
ns7520_eth.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
ns8382x.c net: ns8382x: Add initialized eth_device structure 2010-11-14 23:17:44 +01:00
ns9750_eth.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
pcnet.c net: pcnet: Add initialized eth_device structure 2010-11-14 23:17:45 +01:00
plb2800_eth.c Moved initialization of plb2800 Ethernet driver to board_eth_init 2008-09-02 21:18:18 -07:00
rtl8019.c drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
rtl8019.h Big white-space cleanup. 2008-05-21 00:14:08 +02:00
rtl8139.c net: rtl8139: Add initialized eth_device structure 2010-11-14 23:17:39 +01:00
rtl8169.c net: rtl8169: Add initialized eth_device structure 2010-11-14 23:17:37 +01:00
s3c4510b_eth.c drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
s3c4510b_eth.h drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
sh_eth.c net: sh_eth: add support for SH7757's ETHER 2011-03-16 10:16:34 +09:00
sh_eth.h net: sh_eth: add support for SH7757's ETHER 2011-03-16 10:16:34 +09:00
smc911x.c miiphy: convert to linux/mii.h 2011-01-09 18:06:50 +01:00
smc911x.h smc911x: add support for LAN9220 2009-10-19 10:08:44 -07:00
smc91111.c smc91111: add write_hwaddr 2010-10-11 23:07:28 -07:00
smc91111.h SMC91111: Clean up SMC_inx macros on xsengine and xaeniax 2009-11-09 21:55:09 -08:00
tigon3.c bcm570x: get mac address from environment 2009-03-20 22:39:10 +01:00
tigon3.h Big white-space cleanup. 2008-05-21 00:14:08 +02:00
tsec.c tsec: arrange the code to avoid useless function declaration 2011-04-20 13:44:46 -05:00
tsi108_eth.c net: tsi108_eth: Add initialized eth_device structure 2010-11-14 23:17:46 +01:00
uli526x.c Remove instances of phy_read/write 2011-04-20 13:44:46 -05:00
vsc7385.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
xilinx_emaclite.c net: Move Emaclite to NET_MULTI 2010-10-11 23:07:04 -07:00