u-boot-brain/drivers/net
Luigi 'Comio' Mantellini 4ba31ab33a Rewrite the miiphybb (Bit-banged MII bus driver) in order to support an arbitrary number of mii buses.
This feature is useful when your board uses different mii buses for different
phys and all (or a part) of these buses are implemented via bit-banging mode.

The driver requires that the following macros should be defined into the board
configuration file:

CONFIG_BITBANGMII       - Enable the miiphybb driver
CONFIG_BITBANGMII_MULTI - Enable the multi bus support

If the CONFIG_BITBANGMII_MULTI is not defined, the board's config file needs
to define at least the following macros:

MII_INIT      - Generic code to enable the MII bus (optional)
MDIO_DECLARE  - Declaration needed to access to the MDIO pin (optional)
MDIO_ACTIVE   - Activate the MDIO pin as out pin
MDIO_TRISTATE - Activate the MDIO pin as input/tristate pin
MDIO_READ     - Read the MDIO pin
MDIO(v)       - Write v on the MDIO pin
MDC_DECLARE   - Declaration needed to access to the MDC pin (optional)
MDC(v)        - Write v on the MDC pin

The previous macros make the driver compatible with the previous version
(that didn't support the multi-bus).

When the CONFIG_BITBANGMII_MULTI is also defined, the board code needs to fill
the bb_miiphy_buses[] array with a record for each required bus and declare
the bb_miiphy_buses_num variable with the number of mii buses.
The record (struct bb_miiphy_bus) has the following fields/callbacks (see
miiphy.h for details):

char name[]            - The symbolic name that must be equal to the MII bus
                         registered name
int (*init)()          - Initialization function called at startup time (just
                         before the Ethernet initialization)
int (*mdio_active)()   - Activate the MDIO pin as output
int (*mdio_tristate)() - Activate the MDIO pin as input/tristate pin
int (*set_mdio)()      - Write the MDIO pin
int (*get_mdio)()      - Read the MDIO pin
int (*set_mdc)()       - Write the MDC pin
int (*delay)()         - Delay function
void *priv             - Private data used by board specific code

The board code will look like:

struct bb_miiphy_bus bb_miiphy_buses[] = {
 { .name = miibus#1, .init = b1_init, .mdio_active = b1_mdio_active, ... },
 { .name = miibus#2, .init = b2_init, .mdio_active = b2_mdio_active, ... },
 ...
int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) /
                          sizeof(bb_miiphy_buses[0]);

Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2009-10-10 23:16:53 -07:00
..
phy Rewrite the miiphybb (Bit-banged MII bus driver) in order to support an arbitrary number of mii buses. 2009-10-10 23:16:53 -07:00
sk98lin sk98lin: fix compile warnings 2009-09-15 00:11:48 +02: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 ppc_4xx: Apply new HW register names 2009-10-07 09:15:20 +02: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
ax88180.c AX88180: new gigabit network driver 2008-10-13 22:33:12 -07:00
ax88180.h Coding Style cleanup, update CHANGELOG, prepare 2008.10-rc3 2008-10-15 15:50:45 +02: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 Add debug message for Blackfin Ethernet Rx function. 2009-08-25 13:35:54 -07:00
bfin_mac.h Blackfin: bfin_mac: force boards to setup the MAC themselves 2009-03-20 22:39:09 +01:00
cs8900.c Convert CS8900 Ethernet driver to CONFIG_NET_MULTI API 2009-08-25 13:35:54 -07:00
cs8900.h Convert CS8900 Ethernet driver to CONFIG_NET_MULTI API 2009-08-25 13:35:54 -07:00
davinci_emac.c Switched davinci_emac Ethernet driver to use newer API 2009-06-15 00:13:54 -07:00
dc2114x.c drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
dm9000x.c Convert DM9000 driver for CONFIG_NET_MULTI 2009-06-15 00:13:55 -07: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 Use different PBA value for E1000 PCI and PCIe cards 2009-09-04 22:03:02 +02:00
e1000.h Add Intel E1000 PCIE card support 2009-08-08 02:26:05 -07:00
eepro100.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
enc28j60.c drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
fec_mxc.c Coding Style cleanup; update CHANGELOG. 2009-07-23 22:23:23 +02:00
fec_mxc.h fec_mxc: driver for FEC ethernet controller on i.MX27 2009-07-22 22:59:07 -07:00
fsl_mcdmafec.c drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
ftmac100.c arm: A320: driver for FTMAC100 ethernet controller 2009-08-10 14:53:52 -07:00
ftmac100.h arm: A320: driver for FTMAC100 ethernet controller 2009-08-10 14:53:52 -07:00
greth.c Introduce netdev.h header file and remove externs 2008-09-02 21:18:16 -07:00
greth.h SPARC/LEON3: Added GRETH Ethernet 10/100/1000 driver. 2008-03-30 00:33:28 -04:00
inca-ip_sw.c Moved initialization of IncaIP Ethernet controller to board_eth_init 2008-09-02 21:18:17 -07:00
kirkwood_egiga.c net: kirkwood_egiga.c: fixed build warning 2009-10-04 22:55:02 -07:00
kirkwood_egiga.h arm: kirkwood: See to it that sent data is 8-byte aligned 2009-08-21 09:57:33 -07:00
ks8695eth.c drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
lan91c96.c lan91c96/smc91111/smc911x: get mac address from environment 2009-03-20 22:39:11 +01:00
lan91c96.h Big white-space cleanup. 2008-05-21 00:14:08 +02:00
macb.c at91: Introduction of at91sam9g45 SOC. 2009-07-12 17:43:34 +02:00
macb.h AT91CAP9 support : MACB changes 2008-02-14 09:37:58 +00:00
Makefile Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI API 2009-10-04 22:37:03 -07:00
mcffec.c drivers/net/: get mac address from environment 2009-03-20 22:39:10 +01:00
mcfmii.c Subject: [PATCH] [repost] Standardize the use of MCFFEC_TOUT_LOOP as a udelay(1) loop counter. 2009-06-15 00:13:55 -07:00
mpc5xxx_fec.c mpc52xx phy: initialize only when needed 2009-04-04 22:37:39 +02:00
mpc5xxx_fec.h Move MPC5xxx_FEC driver to drivers/net 2008-08-29 13:58:07 -06:00
mpc512x_fec.c MPC512x: remove include/mpc512x.h 2009-06-12 20:47:16 +02:00
mpc512x_fec.h MPC512x: remove include/mpc512x.h 2009-06-12 20:47:16 +02:00
natsemi.c drivers/net/natsemi.c: fix compile warning 2009-09-15 00:11:02 +02: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: Divided a function of NE2000 driver 2008-10-13 22:28:32 -07: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 stdio/device: rework function naming convention 2009-07-18 00:27:46 +02:00
nicext.h Big white-space cleanup. 2008-05-21 00:14:08 +02:00
ns7520_eth.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
ns8382x.c Cleanup: fix "MHz" spelling 2008-10-21 11:25:39 +02:00
ns9750_eth.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
pcnet.c Moved initialization of PCNET Ethernet controller to board_eth_init() 2008-09-02 21:18:17 -07: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 Cleanup: fix "MHz" spelling 2008-10-21 11:25:39 +02:00
rtl8169.c rtl8169: fix PCI system memory address 2009-06-08 22:57:21 -07: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 sh: sh_eth: Remove garbage from printf 2009-07-22 22:53:43 -07:00
sh_eth.h Fix 100Mbs ethernet operation on sh7763 based boards 2009-02-09 22:52:11 -08:00
smc911x.c Convert SMC911X Ethernet driver to CONFIG_NET_MULTI API 2009-07-22 22:53:44 -07:00
smc911x.h Convert SMC911X Ethernet driver to CONFIG_NET_MULTI API 2009-07-22 22:53:44 -07:00
smc91111.c Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI API 2009-10-04 22:37:03 -07:00
smc91111.h Convert SMC91111 Ethernet driver to CONFIG_NET_MULTI API 2009-10-04 22:37:03 -07: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: Remove PHY command relocation fixups 2009-10-03 10:17:56 +02:00
tsi108_eth.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
uli526x.c Update Freescale copyrights to remove "All Rights Reserved" 2009-07-29 09:59:22 +02:00
vsc7385.c rename CFG_ macros to CONFIG_SYS 2008-10-18 21:54:03 +02:00
xilinx_emaclite.c net: emaclite: Cleanup license to be GPL compatible 2009-09-14 14:40:04 +02:00