CONFIG_DM_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
CONFIG_SH_ETHER=y
CONFIG_MMC_SDHCI_MV=y
CONFIG_SPI_FLASH_STMICRO=y
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_ANEG_TIMEOUT=8000
CONFIG_PHY_MARVELL=y
CONFIG_PHY_GIGE=y
CONFIG_DM_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
CONFIG_SH_ETHER=y
CONFIG_SPI_FLASH_MACRONIX=y
# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_SMSC=y
CONFIG_DM_ETH_PHY=y
CONFIG_SH_ETHER=y
CONFIG_DM_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
CONFIG_SH_ETHER=y
CONFIG_DM_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
CONFIG_SH_ETHER=y
CONFIG_DM_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
CONFIG_SH_ETHER=y
CONFIG_SYS_PBSIZE=2068
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_RENESAS_RAVB=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_MMC_ENV_PART=2
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_RENESAS_RAVB=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_SYS_MMC_ENV_PART=2
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ90X1=y
CONFIG_RENESAS_RAVB=y
#include <configs/renesas_rcar64.config>
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_SYS_PBSIZE=2068
CONFIG_DM_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
CONFIG_SH_ETHER=y
CONFIG_DM_MTD=y
CONFIG_SPI_FLASH_MTD=y
CONFIG_BITBANGMII=y
-CONFIG_BITBANGMII_MULTI=y
CONFIG_PHY_MICREL=y
CONFIG_PHY_MICREL_KSZ8XXX=y
CONFIG_SH_ETHER=y
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):
+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
config BITBANGMII
bool "Bit-banged ethernet MII management channel support"
-config BITBANGMII_MULTI
- bool "Enable the multi bus support"
- depends on BITBANGMII
-
config MV88E6352_SWITCH
bool "Marvell 88E6352 switch support"
#include <miiphy.h>
#include <asm/global_data.h>
-#ifndef CONFIG_BITBANGMII_MULTI
-
-/*
- * If CONFIG_BITBANGMII_MULTI is not defined we use a
- * compatibility layer with the previous miiphybb implementation
- * based on macros usage.
- *
- */
-static int bb_mii_init_wrap(struct bb_miiphy_bus *bus)
-{
-#ifdef MII_INIT
- MII_INIT;
-#endif
- return 0;
-}
-
-static int bb_mdio_active_wrap(struct bb_miiphy_bus *bus)
-{
-#ifdef MDIO_DECLARE
- MDIO_DECLARE;
-#endif
- MDIO_ACTIVE;
- return 0;
-}
-
-static int bb_mdio_tristate_wrap(struct bb_miiphy_bus *bus)
-{
-#ifdef MDIO_DECLARE
- MDIO_DECLARE;
-#endif
- MDIO_TRISTATE;
- return 0;
-}
-
-static int bb_set_mdio_wrap(struct bb_miiphy_bus *bus, int v)
-{
-#ifdef MDIO_DECLARE
- MDIO_DECLARE;
-#endif
- MDIO(v);
- return 0;
-}
-
-static int bb_get_mdio_wrap(struct bb_miiphy_bus *bus, int *v)
-{
-#ifdef MDIO_DECLARE
- MDIO_DECLARE;
-#endif
- *v = MDIO_READ;
- return 0;
-}
-
-static int bb_set_mdc_wrap(struct bb_miiphy_bus *bus, int v)
-{
-#ifdef MDC_DECLARE
- MDC_DECLARE;
-#endif
- MDC(v);
- return 0;
-}
-
-static int bb_delay_wrap(struct bb_miiphy_bus *bus)
-{
- MIIDELAY;
- return 0;
-}
-
-struct bb_miiphy_bus bb_miiphy_buses[] = {
- {
- .name = BB_MII_DEVNAME,
- .init = bb_mii_init_wrap,
- .mdio_active = bb_mdio_active_wrap,
- .mdio_tristate = bb_mdio_tristate_wrap,
- .set_mdio = bb_set_mdio_wrap,
- .get_mdio = bb_get_mdio_wrap,
- .set_mdc = bb_set_mdc_wrap,
- .delay = bb_delay_wrap,
- }
-};
-
-int bb_miiphy_buses_num = sizeof(bb_miiphy_buses) /
- sizeof(bb_miiphy_buses[0]);
-#endif
-
int bb_miiphy_init(void)
{
int i;
static inline struct bb_miiphy_bus *bb_miiphy_getbus(const char *devname)
{
-#ifdef CONFIG_BITBANGMII_MULTI
int i;
/* Search the correct bus */
}
}
return NULL;
-#else
- /* We have just one bitbanging bus */
- return &bb_miiphy_buses[0];
-#endif
}
/*****************************************************************************
int (*get_mdio)(struct bb_miiphy_bus *bus, int *v);
int (*set_mdc)(struct bb_miiphy_bus *bus, int v);
int (*delay)(struct bb_miiphy_bus *bus);
-#ifdef CONFIG_BITBANGMII_MULTI
void *priv;
-#endif
};
extern struct bb_miiphy_bus bb_miiphy_buses[];