mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-11 23:33:26 +09:00
![]() 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> |
||
---|---|---|
.. | ||
phy | ||
sk98lin | ||
3c589.c | ||
3c589.h | ||
4xx_enet.c | ||
5701rls.c | ||
5701rls.h | ||
8390.h | ||
ax88180.c | ||
ax88180.h | ||
ax88796.c | ||
ax88796.h | ||
bcm570x_autoneg.c | ||
bcm570x_autoneg.h | ||
bcm570x_bits.h | ||
bcm570x_debug.h | ||
bcm570x_lm.h | ||
bcm570x_mm.h | ||
bcm570x_queue.h | ||
bcm570x.c | ||
bfin_mac.c | ||
bfin_mac.h | ||
cs8900.c | ||
cs8900.h | ||
davinci_emac.c | ||
dc2114x.c | ||
dm9000x.c | ||
dm9000x.h | ||
dnet.c | ||
dnet.h | ||
e1000.c | ||
e1000.h | ||
eepro100.c | ||
enc28j60.c | ||
fec_mxc.c | ||
fec_mxc.h | ||
fsl_mcdmafec.c | ||
ftmac100.c | ||
ftmac100.h | ||
greth.c | ||
greth.h | ||
inca-ip_sw.c | ||
kirkwood_egiga.c | ||
kirkwood_egiga.h | ||
ks8695eth.c | ||
lan91c96.c | ||
lan91c96.h | ||
macb.c | ||
macb.h | ||
Makefile | ||
mcffec.c | ||
mcfmii.c | ||
mpc5xxx_fec.c | ||
mpc5xxx_fec.h | ||
mpc512x_fec.c | ||
mpc512x_fec.h | ||
natsemi.c | ||
ne2000_base.c | ||
ne2000_base.h | ||
ne2000.c | ||
ne2000.h | ||
netarm_eth.c | ||
netarm_eth.h | ||
netconsole.c | ||
nicext.h | ||
ns7520_eth.c | ||
ns8382x.c | ||
ns9750_eth.c | ||
pcnet.c | ||
plb2800_eth.c | ||
rtl8019.c | ||
rtl8019.h | ||
rtl8139.c | ||
rtl8169.c | ||
s3c4510b_eth.c | ||
s3c4510b_eth.h | ||
sh_eth.c | ||
sh_eth.h | ||
smc911x.c | ||
smc911x.h | ||
smc91111.c | ||
smc91111.h | ||
tigon3.c | ||
tigon3.h | ||
tsec.c | ||
tsi108_eth.c | ||
uli526x.c | ||
vsc7385.c | ||
xilinx_emaclite.c |