[PATCH 10/15] Convert CONFIG_MII_INIT to Kconfig

Tom Rini trini at konsulko.com
Fri Mar 18 13:38:27 CET 2022


This converts the following to Kconfig:
   CONFIG_MII_INIT

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 cmd/Kconfig                           | 4 ++++
 configs/M5208EVBE_defconfig           | 1 +
 configs/M5235EVB_Flash32_defconfig    | 1 +
 configs/M5235EVB_defconfig            | 1 +
 configs/M5272C3_defconfig             | 1 +
 configs/M5275EVB_defconfig            | 1 +
 configs/M5282EVB_defconfig            | 1 +
 configs/M53017EVB_defconfig           | 1 +
 configs/M5329AFEE_defconfig           | 1 +
 configs/M5329BFEE_defconfig           | 1 +
 configs/M5373EVB_defconfig            | 1 +
 configs/MCR3000_defconfig             | 1 +
 configs/eb_cpu5282_defconfig          | 1 +
 configs/eb_cpu5282_internal_defconfig | 1 +
 drivers/net/mcfmii.c                  | 4 +---
 include/configs/M5208EVBE.h           | 1 -
 include/configs/M5235EVB.h            | 1 -
 include/configs/M5272C3.h             | 1 -
 include/configs/M5275EVB.h            | 1 -
 include/configs/M5282EVB.h            | 1 -
 include/configs/M53017EVB.h           | 1 -
 include/configs/M5329EVB.h            | 1 -
 include/configs/M5373EVB.h            | 1 -
 include/configs/MCR3000.h             | 1 -
 include/configs/cobra5272.h           | 1 -
 include/configs/eb_cpu5282.h          | 1 -
 include/configs/stmark2.h             | 1 -
 scripts/config_whitelist.txt          | 1 -
 28 files changed, 18 insertions(+), 16 deletions(-)

diff --git a/cmd/Kconfig b/cmd/Kconfig
index 564daa7bbc8d..25c9fde4a7b3 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 62b284b97bac..6d533d6bee82 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 a3762bb3d768..7552741395a0 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 d4f32e45156f..1bdb63ad1c6c 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 c30b94987282..f0a6aac76125 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 53ff8ee4aeca..809bda0c0687 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 84363fbd924e..69db87c0da28 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 b43478731c1b..8283b52e626a 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 b8900f295f49..1092a1de51eb 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 47e6cb0ca2e7..66347d5f0962 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 c59ba94f2c22..38d20023d555 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 04fe75651337..f174865806c4 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 a1aee405e97c..ae1329c78a01 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 4adc05697628..02a9bb4646e8 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 ca06b35316d3..e2c8f41876e7 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 e30f1ebc35c0..e73c656c3842 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 bc0e00cadd9a..bbe12d10db6f 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 dec1e41936d2..c4ee8c933d99 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 dab512c70f02..5db85ad18429 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 974cfc343d42..cc64893b9af9 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 80ca016d2be2..431fa7406c61 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 e4b887f02e26..d155f2cba047 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 9ad09e827e99..b0b0e2e13bf5 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 4a26ae8f7f17..e26b70a08232 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 607e76c349e1..577936b5af95 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 99d8e9e4e671..4d88657ca61b 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 9bfb8ca9b74e..781dba542bde 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 fe7d24ccb631..fc3b3e3f2962 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -497,7 +497,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
-- 
2.25.1



More information about the U-Boot mailing list