kernel: remove mvsw61xx swconfig driver
[openwrt/staging/mkresin.git] / target / linux / generic / hack-5.4 / 700-swconfig_switch_drivers.patch
1 From 36e516290611e613aa92996cb4339561452695b4 Mon Sep 17 00:00:00 2001
2 From: Felix Fietkau <nbd@nbd.name>
3 Date: Fri, 7 Jul 2017 17:24:23 +0200
4 Subject: net: swconfig: adds openwrt switch layer
5
6 Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 ---
8 drivers/net/phy/Kconfig | 83 +++++++++++++++++++++++++++++++++++++++++++++++
9 drivers/net/phy/Makefile | 15 +++++++++
10 include/uapi/linux/Kbuild | 1 +
11 3 files changed, 99 insertions(+)
12
13 --- a/drivers/net/phy/Kconfig
14 +++ b/drivers/net/phy/Kconfig
15 @@ -250,6 +250,85 @@ config LED_TRIGGER_PHY
16 for any speed known to the PHY.
17
18
19 +comment "Switch configuration API + drivers"
20 +
21 +config SWCONFIG
22 + tristate "Switch configuration API"
23 + ---help---
24 + Switch configuration API using netlink. This allows
25 + you to configure the VLAN features of certain switches.
26 +
27 +config SWCONFIG_LEDS
28 + bool "Switch LED trigger support"
29 + depends on (SWCONFIG && LEDS_TRIGGERS)
30 +
31 +config ADM6996_PHY
32 + tristate "Driver for ADM6996 switches"
33 + select SWCONFIG
34 + ---help---
35 + Currently supports the ADM6996FC and ADM6996M switches.
36 + Support for FC is very limited.
37 +
38 +config AR8216_PHY
39 + tristate "Driver for Atheros AR8216 switches"
40 + select ETHERNET_PACKET_MANGLE
41 + select SWCONFIG
42 +
43 +config AR8216_PHY_LEDS
44 + bool "Atheros AR8216 switch LED support"
45 + depends on (AR8216_PHY && LEDS_CLASS)
46 +
47 +source "drivers/net/phy/b53/Kconfig"
48 +
49 +config IP17XX_PHY
50 + tristate "Driver for IC+ IP17xx switches"
51 + select SWCONFIG
52 +
53 +config MVSWITCH_PHY
54 + tristate "Driver for Marvell 88E6060 switches"
55 + select ETHERNET_PACKET_MANGLE
56 +
57 +config PSB6970_PHY
58 + tristate "Lantiq XWAY Tantos (PSB6970) Ethernet switch"
59 + select SWCONFIG
60 + select ETHERNET_PACKET_MANGLE
61 +
62 +config RTL8306_PHY
63 + tristate "Driver for Realtek RTL8306S switches"
64 + select SWCONFIG
65 +
66 +config RTL8366_SMI
67 + tristate "Driver for the RTL8366 SMI interface"
68 + depends on GPIOLIB
69 + ---help---
70 + This module implements the SMI interface protocol which is used
71 + by some RTL8366 ethernet switch devices via the generic GPIO API.
72 +
73 +if RTL8366_SMI
74 +
75 +config RTL8366_SMI_DEBUG_FS
76 + bool "RTL8366 SMI interface debugfs support"
77 + depends on DEBUG_FS
78 + default n
79 +
80 +config RTL8366S_PHY
81 + tristate "Driver for the Realtek RTL8366S switch"
82 + select SWCONFIG
83 +
84 +config RTL8366RB_PHY
85 + tristate "Driver for the Realtek RTL8366RB switch"
86 + select SWCONFIG
87 +
88 +config RTL8367_PHY
89 + tristate "Driver for the Realtek RTL8367R/M switches"
90 + select SWCONFIG
91 +
92 +config RTL8367B_PHY
93 + tristate "Driver fot the Realtek RTL8367R-VB switch"
94 + select SWCONFIG
95 +
96 +endif # RTL8366_SMI
97 +
98 comment "MII PHY device drivers"
99
100 config SFP
101 --- a/drivers/net/phy/Makefile
102 +++ b/drivers/net/phy/Makefile
103 @@ -22,6 +22,20 @@ libphy-$(CONFIG_LED_TRIGGER_PHY) += phy_
104 obj-$(CONFIG_PHYLINK) += phylink.o
105 obj-$(CONFIG_PHYLIB) += libphy.o
106
107 +obj-$(CONFIG_SWCONFIG) += swconfig.o
108 +obj-$(CONFIG_ADM6996_PHY) += adm6996.o
109 +obj-$(CONFIG_AR8216_PHY) += ar8216.o ar8327.o
110 +obj-$(CONFIG_SWCONFIG_B53) += b53/
111 +obj-$(CONFIG_IP17XX_PHY) += ip17xx.o
112 +obj-$(CONFIG_MVSWITCH_PHY) += mvswitch.o
113 +obj-$(CONFIG_PSB6970_PHY) += psb6970.o
114 +obj-$(CONFIG_RTL8306_PHY) += rtl8306.o
115 +obj-$(CONFIG_RTL8366_SMI) += rtl8366_smi.o
116 +obj-$(CONFIG_RTL8366S_PHY) += rtl8366s.o
117 +obj-$(CONFIG_RTL8366RB_PHY) += rtl8366rb.o
118 +obj-$(CONFIG_RTL8367_PHY) += rtl8367.o
119 +obj-$(CONFIG_RTL8367B_PHY) += rtl8367b.o
120 +
121 obj-$(CONFIG_MDIO_ASPEED) += mdio-aspeed.o
122 obj-$(CONFIG_MDIO_BCM_IPROC) += mdio-bcm-iproc.o
123 obj-$(CONFIG_MDIO_BCM_UNIMAC) += mdio-bcm-unimac.o
124 --- a/include/linux/platform_data/b53.h
125 +++ b/include/linux/platform_data/b53.h
126 @@ -29,6 +29,9 @@ struct b53_platform_data {
127 u32 chip_id;
128 u16 enabled_ports;
129
130 + /* allow to specify an ethX alias */
131 + const char *alias;
132 +
133 /* only used by MMAP'd driver */
134 unsigned big_endian:1;
135 void __iomem *regs;