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.

Signed-off-by: Tom Rini <[email protected]>
---
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(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 7c13055d606c..b5857317ff8c 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -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
diff --git a/drivers/net/mtk_eth/Kconfig b/drivers/net/mtk_eth/Kconfig
index e8cdf4082371..a2060b8bd01e 100644
--- a/drivers/net/mtk_eth/Kconfig
+++ b/drivers/net/mtk_eth/Kconfig
@@ -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
-- 
2.43.0

Reply via email to