Skip to contentSkip to conversation

arm: socfpga: Tighten a few more driver dependencies

PATCH In review Tom Rini 3 participants 8 messages Sep 25, 2025 – Sep 26, 2025

Subsystems (3)
lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/4 arm: socfpga: Tighten a few more driver dependencies

Some drivers which depend on SoCFPGA specific headers had not had appropriate dependencies list in Kconfig. Add ARCH_SOCFPGA or TARGET_SOCFPGA_SOC64 where appropriate.

---
Cc: Tien Fong Chee <[email protected]>

---
 drivers/net/Kconfig          | 4 ++--
 drivers/power/domain/Kconfig | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/Kconfig +2 -2
index d1cb69f85ad4..7c13055d606c 100644
@@ -190,7 +190,7 @@ config DWC_ETH_XGMAC_SOCFPGA
 	bool "Synopsys DWC Ethernet XGMAC device support for SOCFPGA"
 	select REGMAP
 	select SYSCON
-	depends on DWC_ETH_XGMAC
+	depends on ARCH_SOCFPGA && DWC_ETH_XGMAC
 	default y if TARGET_SOCFPGA_AGILEX5
 	help
 	  The Synopsys Designware Ethernet XGMAC IP block with specific
@@ -376,7 +376,7 @@ config ETH_DESIGNWARE_SOCFPGA
 	select SYSCON
 	select DW_ALTDESCRIPTOR
 	bool "Altera SoCFPGA extras for Synopsys Designware Ethernet MAC"
-	depends on ETH_DESIGNWARE
+	depends on ARCH_SOCFPGA && ETH_DESIGNWARE
 	help
 	  The Altera SoCFPGA requires additional configuration of the
 	  Altera system manager to correctly interface with the PHY.
drivers/power/domain/Kconfig +1 -1
index ebf5d828cb02..0ad885c9e8ba 100644
@@ -20,7 +20,7 @@ config APPLE_PMGR_POWER_DOMAIN
 
 config AGILEX5_PMGR_POWER_DOMAIN
 	bool "Enable the Agilex5 PMGR power domain driver"
-	depends on SPL_POWER_DOMAIN
+	depends on SPL_POWER_DOMAIN && TARGET_SOCFPGA_SOC64
 	help
 	  Enable support for power gating peripherals' SRAM specified in
 	  the handoff data values obtained from the bitstream to reduce
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH 2/4 net: Add SYS_FAULT_MII_ADDR to Kconfig

The support found under SYS_FAULT_ECHO_LINK_DOWN requires that the SYS_FAULT_MII_ADDR symbol also be set. This wasn't previously found in Kconfig, so add it now.

---
Cc: Jerome Forissier <[email protected]>

Changes in v2:
- Add missing dependency on LED_STATUS_RED_ENABLE as well.

---
 README      | 3 ---
 net/Kconfig | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)
README +0 -3
index 07cfded6be53..27cde241bef4 100644
@@ -1238,9 +1238,6 @@ Note: once the monitor has been relocated, then it will complain if
 the default environment is used; a new CRC is computed as soon as you
 use the "saveenv" command to store a valid environment.
 
-- CONFIG_SYS_FAULT_MII_ADDR:
-		MII address of the PHY to check for the Ethernet link state.
-
 - CONFIG_DISPLAY_BOARDINFO
 		Display information about the board that U-Boot is running on
 		when U-Boot starts up. The board function checkboard() is called
net/Kconfig +4 -0
index 40ec6bbce761..5768fab6f8fb 100644
@@ -60,6 +60,10 @@ config SYS_FAULT_ECHO_LINK_DOWN
 	  this option is active, then CONFIG_SYS_FAULT_MII_ADDR also needs to
 	  be configured.
 
+config SYS_FAULT_MII_ADDR
+	hex "MII address of the PHY to check for the Ethernet link state"
+	depends on SYS_FAULT_ECHO_LINK_DOWN && LED_STATUS_RED_ENABLE
+
 config TFTP_PORT
 	bool "Set TFTP UDP source/destination ports via the environment"
 	help
Signature · 1 line
2.43.0
Acked-by on v1 2/4
#2 lore raw

Re: [PATCH 2/4] net: Add SYS_FAULT_MII_ADDR to Kconfig

Quoted 34 lines · Tom Rini

The support found under SYS_FAULT_ECHO_LINK_DOWN requires that the SYS_FAULT_MII_ADDR symbol also be set. This wasn't previously found in Kconfig, so add it now.

---
Cc: Jerome Forissier <[email protected]>

Changes in v2:
- Add missing dependency on LED_STATUS_RED_ENABLE as well.

---
 README      | 3 ---
 net/Kconfig | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)
README +0 -3
index 07cfded6be53..27cde241bef4 100644
@@ -1238,9 +1238,6 @@ Note: once the monitor has been relocated, then it will complain if
 the default environment is used; a new CRC is computed as soon as you
 use the "saveenv" command to store a valid environment.
 
-- CONFIG_SYS_FAULT_MII_ADDR:
-		MII address of the PHY to check for the Ethernet link state.
-
 - CONFIG_DISPLAY_BOARDINFO
 		Display information about the board that U-Boot is running on
 		when U-Boot starts up. The board function checkboard() is called
net/Kconfig +0 -0
index 40ec6bbce761..5768fab6f8fb 100644

net/Kconfig config SYS_FAULT_ECHO_LINK_DOWN · line 69

Quoted 10 lines
net/Kconfig +4 -0
@@ -60,6 +60,10 @@ config SYS_FAULT_ECHO_LINK_DOWN
 	  this option is active, then CONFIG_SYS_FAULT_MII_ADDR also needs to
 	  be configured.
 
+config SYS_FAULT_MII_ADDR
+	hex "MII address of the PHY to check for the Ethernet link state"
+	depends on SYS_FAULT_ECHO_LINK_DOWN && LED_STATUS_RED_ENABLE
+
 config TFTP_PORT
 	bool "Set TFTP UDP source/destination ports via the environment"
 	help

Thanks,

Signature · 1 line
Jerome
author
#3 lore raw

PATCH 3/4 net: Remove BOOTP_VENDOREX support

In reply to Tom Rini

It has been over a decade since we had a platform that implemented the bootp vendor extension support hook. Remove this option due to lack of use.

---
Cc: Jerome Forissier <[email protected]>

---
 cmd/Kconfig |  4 ----
 net/bootp.c | 13 -------------
 net/bootp.h |  4 ----
 3 files changed, 21 deletions(-)
cmd/Kconfig +0 -4
index 29de857ba7c2..d4f34f4bc290 100644
@@ -1890,10 +1890,6 @@ config BOOTP_BOOTPATH
 	  Even though the config is called BOOTP_BOOTPATH, it stores the
 	  path in the variable 'rootpath'.
 
-config BOOTP_VENDOREX
-	bool "Support vendor extensions from BOOTP/DHCP server"
-	depends on CMD_BOOTP
-
 config BOOTP_BOOTFILESIZE
 	bool "Request & store 'bootfilesize' from BOOTP/DHCP server"
 	depends on CMD_BOOTP
net/bootp.c +0 -13
index 19e7453daed1..a28d11cb3683 100644
@@ -491,9 +491,6 @@ static int dhcp_extended(u8 *e, int message_type, struct in_addr server_ip,
 #endif
 	int clientarch = -1;
 
-#if defined(CONFIG_BOOTP_VENDOREX)
-	u8 *x;
-#endif
 #if defined(CONFIG_BOOTP_SEND_HOSTNAME)
 	char *hostname;
 #endif
@@ -584,12 +581,6 @@ static int dhcp_extended(u8 *e, int message_type, struct in_addr server_ip,
 
 	e = add_vci(e);
 
-#if defined(CONFIG_BOOTP_VENDOREX)
-	x = dhcp_vendorex_prep(e);
-	if (x)
-		return x - start;
-#endif
-
 	*e++ = 55;		/* Parameter Request List */
 	 cnt = e++;		/* Pointer to count of requested items */
 	*cnt = 0;
@@ -977,10 +968,6 @@ static void dhcp_process_options(uchar *popt, uchar *end)
 			}
 			break;
 		default:
-#if defined(CONFIG_BOOTP_VENDOREX)
-			if (dhcp_vendorex_proc(popt))
-				break;
-#endif
 			printf("*** Unhandled DHCP Option in OFFER/ACK:"
 			       " %d\n", *popt);
 			break;
net/bootp.h +0 -4
index 47c743479e73..14f5af68e150 100644
@@ -24,10 +24,6 @@
 #if defined(CONFIG_CMD_DHCP)
 /* Minimum DHCP Options size per RFC2131 - results in 576 byte pkt */
 #define OPT_FIELD_SIZE 312
-#if defined(CONFIG_BOOTP_VENDOREX)
-extern u8 *dhcp_vendorex_prep(u8 *e); /*rtn new e after add own opts. */
-extern u8 *dhcp_vendorex_proc(u8 *e); /*rtn next e if mine,else NULL  */
-#endif
 #else
 #define OPT_FIELD_SIZE 64
 #endif
Signature · 1 line
2.43.0
Acked-by on v1 3/4
#4 lore raw

Re: [PATCH 3/4] net: Remove BOOTP_VENDOREX support

Quoted 71 lines · Tom Rini

It has been over a decade since we had a platform that implemented the bootp vendor extension support hook. Remove this option due to lack of use.

---
Cc: Jerome Forissier <[email protected]>

---
 cmd/Kconfig |  4 ----
 net/bootp.c | 13 -------------
 net/bootp.h |  4 ----
 3 files changed, 21 deletions(-)
cmd/Kconfig +0 -4
index 29de857ba7c2..d4f34f4bc290 100644
@@ -1890,10 +1890,6 @@ config BOOTP_BOOTPATH
 	  Even though the config is called BOOTP_BOOTPATH, it stores the
 	  path in the variable 'rootpath'.
 
-config BOOTP_VENDOREX
-	bool "Support vendor extensions from BOOTP/DHCP server"
-	depends on CMD_BOOTP
-
 config BOOTP_BOOTFILESIZE
 	bool "Request & store 'bootfilesize' from BOOTP/DHCP server"
 	depends on CMD_BOOTP
net/bootp.c +0 -13
index 19e7453daed1..a28d11cb3683 100644
@@ -491,9 +491,6 @@ static int dhcp_extended(u8 *e, int message_type, struct in_addr server_ip,
 #endif
 	int clientarch = -1;
 
-#if defined(CONFIG_BOOTP_VENDOREX)
-	u8 *x;
-#endif
 #if defined(CONFIG_BOOTP_SEND_HOSTNAME)
 	char *hostname;
 #endif
@@ -584,12 +581,6 @@ static int dhcp_extended(u8 *e, int message_type, struct in_addr server_ip,
 
 	e = add_vci(e);
 
-#if defined(CONFIG_BOOTP_VENDOREX)
-	x = dhcp_vendorex_prep(e);
-	if (x)
-		return x - start;
-#endif
-
 	*e++ = 55;		/* Parameter Request List */
 	 cnt = e++;		/* Pointer to count of requested items */
 	*cnt = 0;
@@ -977,10 +968,6 @@ static void dhcp_process_options(uchar *popt, uchar *end)
 			}
 			break;
 		default:
-#if defined(CONFIG_BOOTP_VENDOREX)
-			if (dhcp_vendorex_proc(popt))
-				break;
-#endif
 			printf("*** Unhandled DHCP Option in OFFER/ACK:"
 			       " %d\n", *popt);
 			break;
net/bootp.h +0 -0
index 47c743479e73..14f5af68e150 100644

net/bootp.h line 29

Quoted 10 lines
net/bootp.h +0 -4
@@ -24,10 +24,6 @@
 #if defined(CONFIG_CMD_DHCP)
 /* Minimum DHCP Options size per RFC2131 - results in 576 byte pkt */
 #define OPT_FIELD_SIZE 312
-#if defined(CONFIG_BOOTP_VENDOREX)
-extern u8 *dhcp_vendorex_prep(u8 *e); /*rtn new e after add own opts. */
-extern u8 *dhcp_vendorex_proc(u8 *e); /*rtn next e if mine,else NULL  */
-#endif
 #else
 #define OPT_FIELD_SIZE 64
 #endif

Thanks,

Signature · 1 line
Jerome
author
#5 lore raw

PATCH 4/4 net: Tighten more driver dependencies

In reply to Tom Rini

In this case, the mediatek network drivers cannot build outside of ARCH_MEDIATEK or ARCH_MTMIPS, and so express this requirement in Kconfig as well. In the case of DWC_ETH_XGMAC / DWC_ETH_XGMAC_SOCFPGA, the file controlled by the DWC_ETH_XGMAC option references a socfpga-specific array defined in the file controlled by DWC_ETH_XGMAC_SOCFPGA. Rework these options in Kconfig to handle this dependency.

---
Cc: Ryder Lee <[email protected]>
Cc: Weijie Gao <[email protected]>
Cc: Chunfeng Yun <[email protected]>
Cc: GSS_MTK_Uboot_upstream <[email protected]> (reviewer:ARM MEDIATEK)
Cc: Boon Khai Ng <[email protected]>
Cc: Tien Fong Chee <[email protected]>

---
 drivers/net/Kconfig         | 5 +++--
 drivers/net/mtk_eth/Kconfig | 1 +
 2 files changed, 4 insertions(+), 2 deletions(-)
drivers/net/Kconfig +3 -2
index 7c13055d606c..b5857317ff8c 100644
@@ -179,7 +179,7 @@ config CALXEDA_XGMAC
 	  machines.
 
 config DWC_ETH_XGMAC
-        bool "Synopsys DWC Ethernet XGMAC device support"
+        bool
 	select PHYLIB
         help
           This driver supports the Synopsys Designware Ethernet XGMAC (10G
@@ -190,7 +190,8 @@ config DWC_ETH_XGMAC_SOCFPGA
 	bool "Synopsys DWC Ethernet XGMAC device support for SOCFPGA"
 	select REGMAP
 	select SYSCON
-	depends on ARCH_SOCFPGA && DWC_ETH_XGMAC
+	select DWC_ETH_XGMAC
+	depends on ARCH_SOCFPGA
 	default y if TARGET_SOCFPGA_AGILEX5
 	help
 	  The Synopsys Designware Ethernet XGMAC IP block with specific
drivers/net/mtk_eth/Kconfig +1 -0
index e8cdf4082371..a2060b8bd01e 100644
@@ -1,6 +1,7 @@
 
 config MEDIATEK_ETH
 	bool "MediaTek Ethernet GMAC Driver"
+	depends on ARCH_MEDIATEK || ARCH_MTMIPS
 	select PHYLIB
 	select DM_GPIO
 	select DM_RESET
Signature · 1 line
2.43.0
#6 lore raw

RE: [PATCH 4/4] net: Tighten more driver dependencies

Hi Tom,

drivers/net/Kconfig config CALXEDA_XGMAC

Quoted 6 lines

config DWC_ETH_XGMAC

drivers/net/Kconfig +1 -1
-        bool "Synopsys DWC Ethernet XGMAC device support"
+        bool
 	select PHYLIB
         help
           This driver supports the Synopsys Designware Ethernet XGMAC (10G @@

That case we shall remove the DWC_ETH_XGMAC config from our socfpga defconfig?

drivers/net/Kconfig config DWC_ETH_XGMAC_SOCFPGA

Quoted 10 lines

-190,7 +190,8 @@ config DWC_ETH_XGMAC_SOCFPGA

drivers/net/Kconfig +2 -1
 	bool "Synopsys DWC Ethernet XGMAC device support for SOCFPGA"
 	select REGMAP
 	select SYSCON
-	depends on ARCH_SOCFPGA && DWC_ETH_XGMAC
+	select DWC_ETH_XGMAC
+	depends on ARCH_SOCFPGA
 	default y if TARGET_SOCFPGA_AGILEX5
 	help
 	  The Synopsys Designware Ethernet XGMAC IP block with specific diff --

And preserve this config DWC_ETH_XGMAC_SOCFPGA?

author
#7 lore raw

Re: [PATCH 4/4] net: Tighten more driver dependencies

Quoted 12 lines · Boon Khai

Hi Tom,

drivers/net/Kconfig config CALXEDA_XGMAC

Quoted 6 lines

config DWC_ETH_XGMAC

drivers/net/Kconfig +1 -1
-        bool "Synopsys DWC Ethernet XGMAC device support"
+        bool
 	select PHYLIB
         help
           This driver supports the Synopsys Designware Ethernet XGMAC (10G @@

That case we shall remove the DWC_ETH_XGMAC config from our socfpga defconfig?

Quoted 12 lines

drivers/net/Kconfig config DWC_ETH_XGMAC_SOCFPGA

Quoted 10 lines

-190,7 +190,8 @@ config DWC_ETH_XGMAC_SOCFPGA

drivers/net/Kconfig +2 -1
 	bool "Synopsys DWC Ethernet XGMAC device support for SOCFPGA"
 	select REGMAP
 	select SYSCON
-	depends on ARCH_SOCFPGA && DWC_ETH_XGMAC
+	select DWC_ETH_XGMAC
+	depends on ARCH_SOCFPGA
 	default y if TARGET_SOCFPGA_AGILEX5
 	help
 	  The Synopsys Designware Ethernet XGMAC IP block with specific diff --

And preserve this config DWC_ETH_XGMAC_SOCFPGA?

Both of the changes have that effect. There's no need to update the defconfig file, it'll get changed on the next resync.

Signature · 1 line
Tom