Skip to content

Commit 31d5d68

Browse files
committed
net: dsa: move DSA core options to subsystem
Moved DSA core options to subsystem. Signed-off-by: Yangbo Lu <[email protected]>
1 parent 5efb48e commit 31d5d68

File tree

3 files changed

+50
-32
lines changed

3 files changed

+50
-32
lines changed

drivers/ethernet/dsa/Kconfig

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
# Distributed Switch Architecture [DSA] configuration options
1+
# Distributed Switch Architecture [DSA] device configuration options
22

33
# Copyright (c) 2020 DENX Software Engineering GmbH
44
# Lukasz Majewski <[email protected]>
5+
# Copyright 2025 NXP
56
# SPDX-License-Identifier: Apache-2.0
67

78
config ETH_DSA_SUPPORT_DEPRECATED
@@ -10,25 +11,13 @@ config ETH_DSA_SUPPORT_DEPRECATED
1011
Set by an ethernet driver that supports DSA. This is obsolete,
1112
and only used for legacy dsa device.
1213

13-
menuconfig NET_DSA
14-
bool "Distributed Switch Architecture support"
14+
menuconfig DSA_DRIVERS
15+
bool "Distributed Switch Architecture device drivers"
16+
default y if NET_DSA
1517
help
1618
Enable Distributed Switch Architecture support.
1719

18-
if NET_DSA
19-
20-
config NET_DSA_DEPRECATED
21-
bool "Distributed Switch Architecture support for legacy device"
22-
select DEPRECATED
23-
depends on ETH_DSA_SUPPORT_DEPRECATED
24-
help
25-
This is obsolete, and only used for legacy dsa device.
26-
27-
config DSA_PORT_MAX_COUNT
28-
int "DSA port max count"
29-
default 8
30-
help
31-
Set DSA port max count.
20+
if DSA_DRIVERS
3221

3322
config DSA_KSZ8XXX
3423
bool
@@ -66,14 +55,6 @@ config DSA_KSZ_TAIL_TAGGING
6655
help
6756
Add support for tail tagging on DSA device.
6857

69-
config DSA_TAG_SIZE
70-
int "DSA tag size in bytes"
71-
default 1 if DSA_KSZ8794 || DSA_KSZ8863 || DSA_KSZ8463
72-
default 0
73-
depends on DSA_KSZ_TAIL_TAGGING
74-
help
75-
Set the DSA tag length in bytes.
76-
7758
config DSA_KSZ_PORT_ISOLATING
7859
bool "Support for ports isolating"
7960
depends on DSA_KSZ8794 || DSA_KSZ8863 || DSA_KSZ8463
@@ -86,10 +67,4 @@ config DSA_SPI
8667
help
8768
Use SPI bus to communicate with PHY
8869

89-
module = NET_DSA
90-
module-dep = NET_LOG
91-
module-str = Log level for DSA
92-
module-help = Enables core DSA code to output debug messages.
93-
source "subsys/net/Kconfig.template.log_config.net"
94-
95-
endif # NET_DSA
70+
endif # DSA_DRIVERS

subsys/net/l2/ethernet/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ module-help = Enables core ARP code to output debug messages.
114114
source "subsys/net/Kconfig.template.log_config.net"
115115
endif # NET_ARP
116116

117+
source "subsys/net/l2/ethernet/dsa/Kconfig"
117118
source "subsys/net/l2/ethernet/gptp/Kconfig"
118119
source "subsys/net/l2/ethernet/lldp/Kconfig"
119120

subsys/net/l2/ethernet/dsa/Kconfig

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Distributed Switch Architecture [DSA] configuration options
2+
3+
# Copyright (c) 2020 DENX Software Engineering GmbH
4+
# Lukasz Majewski <[email protected]>
5+
# Copyright 2025 NXP
6+
# SPDX-License-Identifier: Apache-2.0
7+
8+
menuconfig NET_DSA
9+
bool "Distributed Switch Architecture support"
10+
help
11+
Enable Distributed Switch Architecture support.
12+
13+
if NET_DSA
14+
15+
config NET_DSA_DEPRECATED
16+
bool "Distributed Switch Architecture support for legacy device"
17+
select DEPRECATED
18+
depends on ETH_DSA_SUPPORT_DEPRECATED
19+
help
20+
This is obsolete, and only used for legacy dsa device.
21+
22+
config DSA_PORT_MAX_COUNT
23+
int "DSA port max count"
24+
default 8
25+
help
26+
Set DSA port max count.
27+
28+
config DSA_TAG_SIZE
29+
int "DSA tag size in bytes"
30+
# These platforms are still using legacy DSA core driver
31+
default 1 if DSA_KSZ8794 || DSA_KSZ8863 || DSA_KSZ8463
32+
default 0
33+
help
34+
Set the DSA tag length in bytes.
35+
36+
module = NET_DSA
37+
module-dep = NET_LOG
38+
module-str = Log level for DSA
39+
module-help = Enables core DSA code to output debug messages.
40+
source "subsys/net/Kconfig.template.log_config.net"
41+
42+
endif # NET_DSA

0 commit comments

Comments
 (0)