Skip to content

Commit ec31c8c

Browse files
committed
drivers: ethernet: dwmac: Fix Kconfig for stm32h7
DWMAC driver was no longer selectable for stm32h7 series because of CONFIG_ETH_DWMAC dependency on DT_HAS_SNPS_DESIGNWARE_ETHERNET_MMU_ENABLED, which is only used for MMU based platforms. Restructure Kconfig to have user-selectable options for the platform-specific DWMAC drivers and select the common DWMAC driver accordingly. This way platform-specific dependencies can be tracked on these options, simplifying the logic. Signed-off-by: Tim Pambor <[email protected]>
1 parent d98f7ff commit ec31c8c

File tree

1 file changed

+21
-9
lines changed

1 file changed

+21
-9
lines changed

drivers/ethernet/Kconfig.dwmac

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
# Copyright (c) 2021 BayLibre SAS
44
# SPDX-License-Identifier: Apache-2.0
55

6-
menuconfig ETH_DWMAC
7-
bool "Synopsys DesignWare MAC driver"
8-
default y
6+
menu "Synopsys DesignWare MAC driver"
7+
8+
config ETH_DWMAC
9+
bool
910
depends on NET_BUF_FIXED_DATA_SIZE
10-
depends on (SOC_SERIES_STM32H7X && !ETH_STM32_HAL) || MMU
11-
depends on DT_HAS_SNPS_DESIGNWARE_ETHERNET_ENABLED
1211
help
1312
This is a driver for the Synopsys DesignWare MAC, also referred to
1413
as "DesignWare Cores Ethernet Quality-of-Service". Hardware versions
@@ -25,19 +24,30 @@ menuconfig ETH_DWMAC
2524
- VLAN support
2625
- various hardware offloads (when available)
2726

28-
if ETH_DWMAC
29-
3027
config ETH_DWMAC_STM32H7X
31-
bool
28+
bool "Synopsys DesignWare MAC driver for STM32H7 series"
29+
depends on !ETH_STM32_HAL
3230
depends on SOC_SERIES_STM32H7X
31+
depends on DT_HAS_ST_STM32_ETHERNET_ENABLED
32+
select ETH_DWMAC
3333
select NOCACHE_MEMORY if ARCH_HAS_NOCACHE_MEMORY_SUPPORT
3434
select PINCTRL
3535
default y
36+
help
37+
This enables the Synopsys DesignWare MAC driver on STM32H7 series
38+
SoCs.
3639

3740
config ETH_DWMAC_MMU
38-
bool
41+
bool "Synopsys DesignWare MAC driver for MMU based platforms"
3942
depends on MMU
43+
depends on DT_HAS_SNPS_DESIGNWARE_ETHERNET_ENABLED
44+
select ETH_DWMAC
4045
default y
46+
help
47+
This enables the Synopsys DesignWare MAC driver on MMU based
48+
platforms.
49+
50+
if ETH_DWMAC
4151

4252
config DWMAC_NB_TX_DESCS
4353
int "Number of entries in the transmit descriptor ring"
@@ -67,3 +77,5 @@ config DWMAC_NB_RX_DESCS
6777
dropped packets.
6878

6979
endif # ETH_DWMAC
80+
81+
endmenu

0 commit comments

Comments
 (0)