Skip to content

Commit b213a34

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 6e85c56 commit b213a34

File tree

3 files changed

+56
-38
lines changed

3 files changed

+56
-38
lines changed

drivers/ethernet/dsa/Kconfig

Lines changed: 7 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,17 @@
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

7-
config ETH_DSA_SUPPORT_DEPRECATED
8-
bool
9-
help
10-
Set by an ethernet driver that supports DSA. This is obsolete,
11-
and only used for legacy dsa device.
12-
13-
menuconfig NET_DSA
14-
bool "Distributed Switch Architecture support"
8+
menuconfig DSA_DRIVERS
9+
bool "Distributed Switch Architecture device drivers"
10+
default y if NET_DSA
1511
help
1612
Enable Distributed Switch Architecture support.
1713

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.
14+
if DSA_DRIVERS
3215

3316
config DSA_KSZ8XXX
3417
bool
@@ -66,14 +49,6 @@ config DSA_KSZ_TAIL_TAGGING
6649
help
6750
Add support for tail tagging on DSA device.
6851

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-
7752
config DSA_KSZ_PORT_ISOLATING
7853
bool "Support for ports isolating"
7954
depends on DSA_KSZ8794 || DSA_KSZ8863 || DSA_KSZ8463
@@ -86,10 +61,4 @@ config DSA_SPI
8661
help
8762
Use SPI bus to communicate with PHY
8863

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
64+
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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
config ETH_DSA_SUPPORT_DEPRECATED
9+
bool
10+
help
11+
Set by an ethernet driver that supports DSA. This is obsolete,
12+
and only used for legacy dsa device.
13+
14+
menuconfig NET_DSA
15+
bool "Distributed Switch Architecture support"
16+
help
17+
Enable Distributed Switch Architecture support.
18+
19+
if NET_DSA
20+
21+
config NET_DSA_DEPRECATED
22+
bool "Distributed Switch Architecture support for legacy device"
23+
select DEPRECATED
24+
depends on ETH_DSA_SUPPORT_DEPRECATED
25+
help
26+
This is obsolete, and only used for legacy dsa device.
27+
28+
config DSA_PORT_MAX_COUNT
29+
int "DSA port max count"
30+
default 8
31+
help
32+
Set DSA port max count.
33+
34+
config DSA_TAG_SIZE
35+
int "DSA tag size in bytes"
36+
# These platforms are still using legacy DSA core driver
37+
default 1 if DSA_KSZ8794 || DSA_KSZ8863 || DSA_KSZ8463
38+
default 0
39+
help
40+
Set the DSA tag length in bytes.
41+
42+
module = NET_DSA
43+
module-dep = NET_LOG
44+
module-str = Log level for DSA
45+
module-help = Enables core DSA code to output debug messages.
46+
source "subsys/net/Kconfig.template.log_config.net"
47+
48+
endif # NET_DSA

0 commit comments

Comments
 (0)