[PATCH 22/41] Convert CONFIG_KSNET_NETCP_V1_0 et al to Kconfig

Tom Rini trini at konsulko.com
Fri Dec 2 22:42:32 CET 2022


This converts the following to Kconfig:
   CONFIG_KSNET_NETCP_V1_0
   CONFIG_KSNET_NETCP_V1_5

Signed-off-by: Tom Rini <trini at konsulko.com>
---
 configs/k2hk_evm_defconfig    |  1 +
 configs/k2hk_hs_evm_defconfig |  1 +
 drivers/net/ti/Kconfig        | 13 +++++++++++++
 include/configs/k2e_evm.h     |  1 -
 include/configs/k2g_evm.h     |  1 -
 include/configs/k2hk_evm.h    |  1 -
 include/configs/k2l_evm.h     |  1 -
 7 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/configs/k2hk_evm_defconfig b/configs/k2hk_evm_defconfig
index b0069fd60b01..2bcf2265c7ea 100644
--- a/configs/k2hk_evm_defconfig
+++ b/configs/k2hk_evm_defconfig
@@ -87,6 +87,7 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_MARVELL=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_KEYSTONE_NET=y
+CONFIG_KSNET_NETCP_V1_0=y
 CONFIG_PHY=y
 CONFIG_NOP_PHY=y
 CONFIG_KEYSTONE_USB_PHY=y
diff --git a/configs/k2hk_hs_evm_defconfig b/configs/k2hk_hs_evm_defconfig
index 9ca26ae61f51..94ab680343b9 100644
--- a/configs/k2hk_hs_evm_defconfig
+++ b/configs/k2hk_hs_evm_defconfig
@@ -62,6 +62,7 @@ CONFIG_PHYLIB=y
 CONFIG_PHY_MARVELL=y
 CONFIG_MII=y
 CONFIG_DRIVER_TI_KEYSTONE_NET=y
+CONFIG_KSNET_NETCP_V1_0=y
 CONFIG_PHY=y
 CONFIG_NOP_PHY=y
 CONFIG_KEYSTONE_USB_PHY=y
diff --git a/drivers/net/ti/Kconfig b/drivers/net/ti/Kconfig
index 59c96d862ddc..e13dbc940182 100644
--- a/drivers/net/ti/Kconfig
+++ b/drivers/net/ti/Kconfig
@@ -25,6 +25,19 @@ config DRIVER_TI_KEYSTONE_NET
 	help
 	   This driver supports the TI Keystone 2 Ethernet subsystem
 
+choice
+	prompt "TI Keystone 2 Ethernet NETCP IP revision"
+	depends on DRIVER_TI_KEYSTONE_NET
+	default KSNET_NETCP_V1_5
+
+config KSNET_NETCP_V1_0
+	bool "NETCP version 1.0"
+
+config KSNET_NETCP_V1_5
+	bool "NETCP version 1.5"
+
+endchoice
+
 config TI_AM65_CPSW_NUSS
 	bool "TI K3 AM65x MCU CPSW Nuss Ethernet controller driver"
 	depends on ARCH_K3
diff --git a/include/configs/k2e_evm.h b/include/configs/k2e_evm.h
index 174a91c83e19..1283f450b32c 100644
--- a/include/configs/k2e_evm.h
+++ b/include/configs/k2e_evm.h
@@ -37,7 +37,6 @@
 #define SPI_MTD_PARTS KEYSTONE_SPI0_MTD_PARTS
 
 /* Network */
-#define CONFIG_KSNET_NETCP_V1_5
 #define CONFIG_KSNET_CPSW_NUM_PORTS	9
 
 #endif /* __CONFIG_K2E_EVM_H */
diff --git a/include/configs/k2g_evm.h b/include/configs/k2g_evm.h
index dc06d5943e5c..fd3708ba81a7 100644
--- a/include/configs/k2g_evm.h
+++ b/include/configs/k2g_evm.h
@@ -51,7 +51,6 @@
 	"name_fs=arago-base-tisdk-image-k2g-evm.cpio\0"
 
 /* Network */
-#define CONFIG_KSNET_NETCP_V1_5
 #define CONFIG_KSNET_CPSW_NUM_PORTS	2
 #define PHY_ANEG_TIMEOUT	10000 /* PHY needs longer aneg time */
 
diff --git a/include/configs/k2hk_evm.h b/include/configs/k2hk_evm.h
index 68cbe98b553b..36e3c59d1c58 100644
--- a/include/configs/k2hk_evm.h
+++ b/include/configs/k2hk_evm.h
@@ -37,7 +37,6 @@
 #define SPI_MTD_PARTS KEYSTONE_SPI0_MTD_PARTS
 
 /* Network */
-#define CONFIG_KSNET_NETCP_V1_0
 #define CONFIG_KSNET_CPSW_NUM_PORTS	5
 
 #endif /* __CONFIG_K2HK_EVM_H */
diff --git a/include/configs/k2l_evm.h b/include/configs/k2l_evm.h
index 5d629452bae4..cb7b0367810c 100644
--- a/include/configs/k2l_evm.h
+++ b/include/configs/k2l_evm.h
@@ -37,7 +37,6 @@
 #define SPI_MTD_PARTS KEYSTONE_SPI0_MTD_PARTS
 
 /* Network */
-#define CONFIG_KSNET_NETCP_V1_5
 #define CONFIG_KSNET_CPSW_NUM_PORTS	5
 
 #endif /* __CONFIG_K2L_EVM_H */
-- 
2.25.1



More information about the U-Boot mailing list