[PATCH 14/20] Convert CONFIG_SYS_FMAN_V3 to Kconfig

Tom Rini trini at konsulko.com
Sat Jul 23 19:05:06 CEST 2022


This converts the following to Kconfig:
   CONFIG_SYS_FMAN_V3

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 arch/arm/include/asm/arch-fsl-layerscape/config.h | 2 --
 arch/powerpc/include/asm/config_mpc85xx.h         | 5 -----
 drivers/net/Kconfig                               | 8 ++++++++
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/arch/arm/include/asm/arch-fsl-layerscape/config.h b/arch/arm/include/asm/arch-fsl-layerscape/config.h
index cd795d6919ac..9aee971b7260 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/config.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/config.h
@@ -264,7 +264,6 @@
 
 /* SoC related */
 #ifdef CONFIG_ARCH_LS1043A
-#define CONFIG_SYS_FMAN_V3
 #define CONFIG_SYS_FSL_QMAN_V3
 #define CONFIG_SYS_NUM_FMAN			1
 #define CONFIG_SYS_NUM_FM1_DTSEC		7
@@ -317,7 +316,6 @@
 #define CONFIG_MAX_MEM_MAPPED		CONFIG_SYS_DDR_BLOCK1_SIZE
 
 #elif defined(CONFIG_ARCH_LS1046A)
-#define CONFIG_SYS_FMAN_V3
 #define CONFIG_SYS_FSL_QMAN_V3
 #define CONFIG_SYS_NUM_FMAN			1
 #define CONFIG_SYS_NUM_FM1_DTSEC		8
diff --git a/arch/powerpc/include/asm/config_mpc85xx.h b/arch/powerpc/include/asm/config_mpc85xx.h
index a43e6e5e538b..1dcbe0670b62 100644
--- a/arch/powerpc/include/asm/config_mpc85xx.h
+++ b/arch/powerpc/include/asm/config_mpc85xx.h
@@ -183,7 +183,6 @@
 #define CONFIG_SYS_NUM_FMAN		2
 #define CONFIG_SYS_PME_CLK		0
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT	8
-#define CONFIG_SYS_FMAN_V3
 #define CONFIG_SYS_FM1_CLK		3
 #define CONFIG_SYS_FM2_CLK		3
 #define CONFIG_SYS_FM_MURAM_SIZE	0x60000
@@ -205,7 +204,6 @@
 #define CONFIG_SYS_NUM_FMAN		1
 #define CONFIG_SYS_FM1_CLK		0
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT	4
-#define CONFIG_SYS_FMAN_V3
 #define CONFIG_SYS_FM_MURAM_SIZE	0x60000
 #define CONFIG_SYS_FSL_TBCLK_DIV	16
 #define CONFIG_SYS_FSL_PCIE_COMPAT	"fsl,qoriq-pcie-v2.4"
@@ -244,7 +242,6 @@
 #define CONFIG_PME_PLAT_CLK_DIV		2
 #define CONFIG_SYS_PME_CLK		CONFIG_PME_PLAT_CLK_DIV
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT	8
-#define CONFIG_SYS_FMAN_V3
 #define CONFIG_FM_PLAT_CLK_DIV	1
 #define CONFIG_SYS_FM1_CLK		CONFIG_FM_PLAT_CLK_DIV
 #define CONFIG_SYS_FM_MURAM_SIZE	0x30000
@@ -262,7 +259,6 @@
 #define CONFIG_FSL_CORENET	     /* Freescale CoreNet platform */
 #define CONFIG_SYS_FSL_CORES_PER_CLUSTER 1
 #define CONFIG_SYS_FSL_QMAN_V3	 /* QMAN version 3 */
-#define CONFIG_SYS_FMAN_V3
 #define CONFIG_SYS_FSL_NUM_CC_PLL	2
 #define CONFIG_SYS_FSL_CLUSTER_CLOCKS  { 1, 1, 1, 1 }
 #define CONFIG_SYS_FSL_SRDS_1
@@ -305,7 +301,6 @@
 #define CONFIG_SYS_PME_CLK		CONFIG_PME_PLAT_CLK_DIV
 #define CONFIG_SYS_FM1_CLK		0
 #define CONFIG_SYS_FSL_IFC_BANK_COUNT	8
-#define CONFIG_SYS_FMAN_V3
 #define CONFIG_SYS_FM_MURAM_SIZE	0x28000
 #define CONFIG_SYS_FSL_TBCLK_DIV	16
 #define CONFIG_SYS_FSL_PCIE_COMPAT	"fsl,qoriq-pcie-v3.0"
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index b671e72580e2..637aca4d7e99 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -357,6 +357,9 @@ config FEC_MXC
 config FMAN_ENET
 	bool "Freescale FMan ethernet support"
 	depends on ARM || PPC
+	select SYS_FMAN_V3 if ARCH_B4420 || ARCH_B4860 || ARCH_LS1043A || \
+		ARCH_LS1046A || ARCH_T1024 || ARCH_T1040 || ARCH_T1042 || \
+		ARCH_T2080 || ARCH_T4240
 	help
 	  This driver support the Freescale FMan Ethernet controller
 
@@ -370,6 +373,11 @@ config SYS_QE_FMAN_FW_LENGTH
 	depends on FMAN_ENET || QE || U_QE
 	default 0x10000
 
+config SYS_FMAN_V3
+	bool
+	help
+	  SoC has FMan v3 with mEMAC
+
 config FTMAC100
 	bool "Ftmac100 Ethernet Support"
 	help
-- 
2.25.1



More information about the U-Boot mailing list