aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa
diff options
context:
space:
mode:
authorBen Hutchings <ben@decadent.org.uk>2011-11-25 09:38:38 -0500
committerDavid S. Miller <davem@davemloft.net>2011-11-26 14:48:16 -0500
commit34a430d7bd26b35ca3a7d3fc83663de8ea6e33f6 (patch)
tree8646a156a13e68babdc8daa85bec607c68bc7800 /net/dsa
parent3d825ede8c79a4799a6a3c34719551c7c1908b96 (diff)
dsa: Allow core and drivers to be built as modules
Change the kconfig types to tristate and adjust the condition for declaring net_device::dsa_ptr to allow for this. Adjust the makefile so that if NET_DSA_MV88E6123_61_65=y and NET_DSA_MV88E6131=m or vice versa then both drivers are built-in. We could leave these options as bool and make NET_DSA_MV88E6XXX a user-selected option, but that would break existing configurations. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/Kconfig10
-rw-r--r--net/dsa/Makefile8
2 files changed, 11 insertions, 7 deletions
diff --git a/net/dsa/Kconfig b/net/dsa/Kconfig
index c53ded2a98df..7e12303827e8 100644
--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -1,5 +1,5 @@
1menuconfig NET_DSA 1menuconfig NET_DSA
2 bool "Distributed Switch Architecture support" 2 tristate "Distributed Switch Architecture support"
3 default n 3 default n
4 depends on EXPERIMENTAL && NETDEVICES && !S390 4 depends on EXPERIMENTAL && NETDEVICES && !S390
5 select PHYLIB 5 select PHYLIB
@@ -26,11 +26,11 @@ config NET_DSA_TAG_TRAILER
26 26
27# switch drivers 27# switch drivers
28config NET_DSA_MV88E6XXX 28config NET_DSA_MV88E6XXX
29 bool 29 tristate
30 default n 30 default n
31 31
32config NET_DSA_MV88E6060 32config NET_DSA_MV88E6060
33 bool "Marvell 88E6060 ethernet switch chip support" 33 tristate "Marvell 88E6060 ethernet switch chip support"
34 select NET_DSA_TAG_TRAILER 34 select NET_DSA_TAG_TRAILER
35 ---help--- 35 ---help---
36 This enables support for the Marvell 88E6060 ethernet switch 36 This enables support for the Marvell 88E6060 ethernet switch
@@ -41,7 +41,7 @@ config NET_DSA_MV88E6XXX_NEED_PPU
41 default n 41 default n
42 42
43config NET_DSA_MV88E6131 43config NET_DSA_MV88E6131
44 bool "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support" 44 tristate "Marvell 88E6085/6095/6095F/6131 ethernet switch chip support"
45 select NET_DSA_MV88E6XXX 45 select NET_DSA_MV88E6XXX
46 select NET_DSA_MV88E6XXX_NEED_PPU 46 select NET_DSA_MV88E6XXX_NEED_PPU
47 select NET_DSA_TAG_DSA 47 select NET_DSA_TAG_DSA
@@ -50,7 +50,7 @@ config NET_DSA_MV88E6131
50 ethernet switch chips. 50 ethernet switch chips.
51 51
52config NET_DSA_MV88E6123_61_65 52config NET_DSA_MV88E6123_61_65
53 bool "Marvell 88E6123/6161/6165 ethernet switch chip support" 53 tristate "Marvell 88E6123/6161/6165 ethernet switch chip support"
54 select NET_DSA_MV88E6XXX 54 select NET_DSA_MV88E6XXX
55 select NET_DSA_TAG_EDSA 55 select NET_DSA_TAG_EDSA
56 ---help--- 56 ---help---
diff --git a/net/dsa/Makefile b/net/dsa/Makefile
index 5c48ac556997..191dd482e557 100644
--- a/net/dsa/Makefile
+++ b/net/dsa/Makefile
@@ -11,5 +11,9 @@ dsa_core-$(CONFIG_NET_DSA_TAG_TRAILER) += tag_trailer.o
11obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o 11obj-$(CONFIG_NET_DSA_MV88E6060) += mv88e6060.o
12obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx_drv.o 12obj-$(CONFIG_NET_DSA_MV88E6XXX) += mv88e6xxx_drv.o
13mv88e6xxx_drv-y += mv88e6xxx.o 13mv88e6xxx_drv-y += mv88e6xxx.o
14mv88e6xxx_drv-$(CONFIG_NET_DSA_MV88E6123_61_65) += mv88e6123_61_65.o 14ifdef CONFIG_NET_DSA_MV88E6123_61_65
15mv88e6xxx_drv-$(CONFIG_NET_DSA_MV88E6131) += mv88e6131.o 15mv88e6xxx_drv-y += mv88e6123_61_65.o
16endif
17ifdef CONFIG_NET_DSA_MV88E6131
18mv88e6xxx_drv-y += mv88e6131.o
19endif