From: Tom Rini Date: Fri, 18 Mar 2022 12:38:27 +0000 (-0400) Subject: Convert CONFIG_MII_INIT to Kconfig X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=cc386f161c3bd63c8370444df49d9fc36b60e403;p=u-boot.git Convert CONFIG_MII_INIT to Kconfig This converts the following to Kconfig: CONFIG_MII_INIT Signed-off-by: Tom Rini --- diff --git a/cmd/Kconfig b/cmd/Kconfig index 564daa7bbc..25c9fde4a7 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -1658,6 +1658,10 @@ config CMD_MII to management parameters and services. The interface is referred to as the MII management interface. +config MII_INIT + bool "Call mii_init() in the mii command" + depends on CMD_MII && (MPC8XX_FEC || FSLDMAFE || MCFFEC) + config CMD_MDIO bool "mdio" depends on PHYLIB diff --git a/configs/M5208EVBE_defconfig b/configs/M5208EVBE_defconfig index 62b284b97b..6d533d6bee 100644 --- a/configs/M5208EVBE_defconfig +++ b/configs/M5208EVBE_defconfig @@ -14,6 +14,7 @@ CONFIG_SYS_PROMPT="-> " CONFIG_CMD_IMLS=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_ENV_IS_IN_FLASH=y diff --git a/configs/M5235EVB_Flash32_defconfig b/configs/M5235EVB_Flash32_defconfig index a3762bb3d7..7552741395 100644 --- a/configs/M5235EVB_Flash32_defconfig +++ b/configs/M5235EVB_Flash32_defconfig @@ -20,6 +20,7 @@ CONFIG_CMD_PCI=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_ENV_IS_IN_FLASH=y diff --git a/configs/M5235EVB_defconfig b/configs/M5235EVB_defconfig index d4f32e4515..1bdb63ad1c 100644 --- a/configs/M5235EVB_defconfig +++ b/configs/M5235EVB_defconfig @@ -20,6 +20,7 @@ CONFIG_CMD_PCI=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_ENV_IS_IN_FLASH=y diff --git a/configs/M5272C3_defconfig b/configs/M5272C3_defconfig index c30b949872..f0a6aac761 100644 --- a/configs/M5272C3_defconfig +++ b/configs/M5272C3_defconfig @@ -17,6 +17,7 @@ CONFIG_CMD_IMLS=y # CONFIG_CMD_SETEXPR is not set CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_ENV_ADDR=0xFFE04000 diff --git a/configs/M5275EVB_defconfig b/configs/M5275EVB_defconfig index 53ff8ee4ae..809bda0c06 100644 --- a/configs/M5275EVB_defconfig +++ b/configs/M5275EVB_defconfig @@ -21,6 +21,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_ENV_ADDR=0xFFE04000 diff --git a/configs/M5282EVB_defconfig b/configs/M5282EVB_defconfig index 84363fbd92..69db87c0da 100644 --- a/configs/M5282EVB_defconfig +++ b/configs/M5282EVB_defconfig @@ -17,6 +17,7 @@ CONFIG_CMD_IMLS=y # CONFIG_CMD_SETEXPR is not set CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_ENV_ADDR=0xFFE04000 diff --git a/configs/M53017EVB_defconfig b/configs/M53017EVB_defconfig index b43478731c..8283b52e62 100644 --- a/configs/M53017EVB_defconfig +++ b/configs/M53017EVB_defconfig @@ -16,6 +16,7 @@ CONFIG_SYS_PROMPT="-> " CONFIG_CMD_IMLS=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_CMD_DATE=y diff --git a/configs/M5329AFEE_defconfig b/configs/M5329AFEE_defconfig index b8900f295f..1092a1de51 100644 --- a/configs/M5329AFEE_defconfig +++ b/configs/M5329AFEE_defconfig @@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_NAND=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_CMD_DATE=y diff --git a/configs/M5329BFEE_defconfig b/configs/M5329BFEE_defconfig index 47e6cb0ca2..66347d5f09 100644 --- a/configs/M5329BFEE_defconfig +++ b/configs/M5329BFEE_defconfig @@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_NAND=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_CMD_DATE=y diff --git a/configs/M5373EVB_defconfig b/configs/M5373EVB_defconfig index c59ba94f2c..38d20023d5 100644 --- a/configs/M5373EVB_defconfig +++ b/configs/M5373EVB_defconfig @@ -17,6 +17,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_NAND=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y CONFIG_CMD_CACHE=y CONFIG_CMD_DATE=y diff --git a/configs/MCR3000_defconfig b/configs/MCR3000_defconfig index 04fe756513..f174865806 100644 --- a/configs/MCR3000_defconfig +++ b/configs/MCR3000_defconfig @@ -42,6 +42,7 @@ CONFIG_CMD_NAND=y # CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_PING=y # CONFIG_CMD_SLEEP is not set CONFIG_OF_CONTROL=y diff --git a/configs/eb_cpu5282_defconfig b/configs/eb_cpu5282_defconfig index a1aee405e9..ae1329c78a 100644 --- a/configs/eb_cpu5282_defconfig +++ b/configs/eb_cpu5282_defconfig @@ -23,6 +23,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_DATE=y CONFIG_ENV_ADDR=0xFF040000 CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y diff --git a/configs/eb_cpu5282_internal_defconfig b/configs/eb_cpu5282_internal_defconfig index 4adc056976..02a9bb4646 100644 --- a/configs/eb_cpu5282_internal_defconfig +++ b/configs/eb_cpu5282_internal_defconfig @@ -22,6 +22,7 @@ CONFIG_CMD_I2C=y CONFIG_CMD_DHCP=y CONFIG_BOOTP_BOOTFILESIZE=y CONFIG_CMD_MII=y +CONFIG_MII_INIT=y CONFIG_CMD_DATE=y CONFIG_ENV_ADDR=0xFF040000 CONFIG_SYS_FAULT_ECHO_LINK_DOWN=y diff --git a/drivers/net/mcfmii.c b/drivers/net/mcfmii.c index ca06b35316..e2c8f41876 100644 --- a/drivers/net/mcfmii.c +++ b/drivers/net/mcfmii.c @@ -200,9 +200,7 @@ int mii_discover_phy(fec_info_t *info) } #endif /* CONFIG_SYS_DISCOVER_PHY */ -void mii_init(void) __attribute__((weak,alias("__mii_init"))); - -void __mii_init(void) +__weak void mii_init(void) { #ifdef CONFIG_DM_ETH struct udevice *dev; diff --git a/include/configs/M5208EVBE.h b/include/configs/M5208EVBE.h index e30f1ebc35..e73c656c38 100644 --- a/include/configs/M5208EVBE.h +++ b/include/configs/M5208EVBE.h @@ -18,7 +18,6 @@ #define CONFIG_WATCHDOG_TIMEOUT 5000 #ifdef CONFIG_MCFFEC -# define CONFIG_MII_INIT 1 # define CONFIG_SYS_DISCOVER_PHY /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ # ifndef CONFIG_SYS_DISCOVER_PHY diff --git a/include/configs/M5235EVB.h b/include/configs/M5235EVB.h index bc0e00cadd..bbe12d10db 100644 --- a/include/configs/M5235EVB.h +++ b/include/configs/M5235EVB.h @@ -23,7 +23,6 @@ #define CONFIG_WATCHDOG_TIMEOUT 5000 /* timeout in milliseconds, max timeout is 6.71sec */ #ifdef CONFIG_MCFFEC -# define CONFIG_MII_INIT 1 # define CONFIG_SYS_DISCOVER_PHY /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ # ifndef CONFIG_SYS_DISCOVER_PHY diff --git a/include/configs/M5272C3.h b/include/configs/M5272C3.h index dec1e41936..c4ee8c933d 100644 --- a/include/configs/M5272C3.h +++ b/include/configs/M5272C3.h @@ -33,7 +33,6 @@ env/embedded.o(.text); #ifdef CONFIG_MCFFEC -# define CONFIG_MII_INIT 1 # define CONFIG_SYS_DISCOVER_PHY /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ # ifndef CONFIG_SYS_DISCOVER_PHY diff --git a/include/configs/M5275EVB.h b/include/configs/M5275EVB.h index dab512c70f..5db85ad184 100644 --- a/include/configs/M5275EVB.h +++ b/include/configs/M5275EVB.h @@ -36,7 +36,6 @@ /* Available command configuration */ #ifdef CONFIG_MCFFEC -#define CONFIG_MII_INIT 1 #define CONFIG_SYS_DISCOVER_PHY /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ #ifndef CONFIG_SYS_DISCOVER_PHY diff --git a/include/configs/M5282EVB.h b/include/configs/M5282EVB.h index 974cfc343d..cc64893b9a 100644 --- a/include/configs/M5282EVB.h +++ b/include/configs/M5282EVB.h @@ -31,7 +31,6 @@ env/embedded.o(.text*); #ifdef CONFIG_MCFFEC -# define CONFIG_MII_INIT 1 # define CONFIG_SYS_DISCOVER_PHY /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ # ifndef CONFIG_SYS_DISCOVER_PHY diff --git a/include/configs/M53017EVB.h b/include/configs/M53017EVB.h index 80ca016d2b..431fa7406c 100644 --- a/include/configs/M53017EVB.h +++ b/include/configs/M53017EVB.h @@ -25,7 +25,6 @@ #define CONFIG_SYS_UNIFY_CACHE #ifdef CONFIG_MCFFEC -# define CONFIG_MII_INIT 1 # define CONFIG_SYS_DISCOVER_PHY # define CONFIG_SYS_TX_ETH_BUFFER 8 # define CONFIG_SYS_FEC_BUF_USE_SRAM diff --git a/include/configs/M5329EVB.h b/include/configs/M5329EVB.h index e4b887f02e..d155f2cba0 100644 --- a/include/configs/M5329EVB.h +++ b/include/configs/M5329EVB.h @@ -25,7 +25,6 @@ #define CONFIG_SYS_UNIFY_CACHE #ifdef CONFIG_MCFFEC -# define CONFIG_MII_INIT 1 # define CONFIG_SYS_DISCOVER_PHY /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ # ifndef CONFIG_SYS_DISCOVER_PHY diff --git a/include/configs/M5373EVB.h b/include/configs/M5373EVB.h index 9ad09e827e..b0b0e2e13b 100644 --- a/include/configs/M5373EVB.h +++ b/include/configs/M5373EVB.h @@ -27,7 +27,6 @@ #define CONFIG_SYS_UNIFY_CACHE #ifdef CONFIG_MCFFEC -# define CONFIG_MII_INIT 1 # define CONFIG_SYS_DISCOVER_PHY /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ # ifndef CONFIG_SYS_DISCOVER_PHY diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h index 4a26ae8f7f..e26b70a082 100644 --- a/include/configs/MCR3000.h +++ b/include/configs/MCR3000.h @@ -88,7 +88,6 @@ /* Ethernet configuration part */ #define CONFIG_SYS_DISCOVER_PHY 1 -#define CONFIG_MII_INIT 1 /* NAND configuration part */ #define CONFIG_SYS_MAX_NAND_DEVICE 1 diff --git a/include/configs/cobra5272.h b/include/configs/cobra5272.h index 607e76c349..577936b5af 100644 --- a/include/configs/cobra5272.h +++ b/include/configs/cobra5272.h @@ -89,7 +89,6 @@ env/embedded.o(.text); #ifdef CONFIG_MCFFEC -# define CONFIG_MII_INIT 1 # define CONFIG_SYS_DISCOVER_PHY /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ # ifndef CONFIG_SYS_DISCOVER_PHY diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h index 99d8e9e4e6..4d88657ca6 100644 --- a/include/configs/eb_cpu5282.h +++ b/include/configs/eb_cpu5282.h @@ -52,7 +52,6 @@ *----------------------------------------------------------------------*/ #ifdef CONFIG_MCFFEC -#define CONFIG_MII_INIT 1 #define CONFIG_SYS_DISCOVER_PHY #define CONFIG_OVERWRITE_ETHADDR_ONCE #endif diff --git a/include/configs/stmark2.h b/include/configs/stmark2.h index 9bfb8ca9b7..781dba542b 100644 --- a/include/configs/stmark2.h +++ b/include/configs/stmark2.h @@ -132,7 +132,6 @@ CONFIG_SYS_INIT_RAM_SIZE - 12) #ifdef CONFIG_MCFFEC -#define CONFIG_MII_INIT 1 #define CONFIG_SYS_DISCOVER_PHY /* If CONFIG_SYS_DISCOVER_PHY is not defined - hardcoded */ #ifndef CONFIG_SYS_DISCOVER_PHY diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 8cbab7e20e..bb8d310b79 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -499,7 +499,6 @@ CONFIG_MEM_INIT_VALUE CONFIG_MEM_REMAP CONFIG_MFG_ENV_SETTINGS CONFIG_MII_DEFAULT_TSEC -CONFIG_MII_INIT CONFIG_MISC_COMMON CONFIG_MIU_2BIT_21_7_INTERLEAVED CONFIG_MIU_2BIT_INTERLEAVED