[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191112124420.6225-11-olteanv@gmail.com>
Date: Tue, 12 Nov 2019 14:44:18 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: jakub.kicinski@...ronome.com, davem@...emloft.net,
alexandre.belloni@...tlin.com
Cc: andrew@...n.ch, f.fainelli@...il.com, vivien.didelot@...il.com,
joergen.andreasen@...rochip.com, allan.nielsen@...rochip.com,
horatiu.vultur@...rochip.com, claudiu.manoil@....com,
netdev@...r.kernel.org, Vladimir Oltean <vladimir.oltean@....com>
Subject: [PATCH net-next 10/12] net: dsa: vitesse: move vsc73xx driver to a separate folder
From: Vladimir Oltean <vladimir.oltean@....com>
The vitesse/ folder will contain drivers for switching chips derived
from legacy Vitesse IPs (VSC family), including those produced by
Microsemi and Microchip (acquirers of Vitesse).
Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
---
drivers/net/dsa/Kconfig | 31 +------------------
drivers/net/dsa/Makefile | 4 +--
drivers/net/dsa/vitesse/Kconfig | 31 +++++++++++++++++++
drivers/net/dsa/vitesse/Makefile | 3 ++
.../vsc73xx-core.c} | 2 +-
.../vsc73xx-platform.c} | 2 +-
.../vsc73xx-spi.c} | 2 +-
.../{vitesse-vsc73xx.h => vitesse/vsc73xx.h} | 0
8 files changed, 39 insertions(+), 36 deletions(-)
create mode 100644 drivers/net/dsa/vitesse/Kconfig
create mode 100644 drivers/net/dsa/vitesse/Makefile
rename drivers/net/dsa/{vitesse-vsc73xx-core.c => vitesse/vsc73xx-core.c} (99%)
rename drivers/net/dsa/{vitesse-vsc73xx-platform.c => vitesse/vsc73xx-platform.c} (99%)
rename drivers/net/dsa/{vitesse-vsc73xx-spi.c => vitesse/vsc73xx-spi.c} (99%)
rename drivers/net/dsa/{vitesse-vsc73xx.h => vitesse/vsc73xx.h} (100%)
diff --git a/drivers/net/dsa/Kconfig b/drivers/net/dsa/Kconfig
index 685e12b05a7c..ec91960e58ac 100644
--- a/drivers/net/dsa/Kconfig
+++ b/drivers/net/dsa/Kconfig
@@ -99,35 +99,6 @@ config NET_DSA_SMSC_LAN9303_MDIO
Enable access functions if the SMSC/Microchip LAN9303 is configured
for MDIO managed mode.
-config NET_DSA_VITESSE_VSC73XX
- tristate
- depends on OF
- depends on NET_DSA
- select FIXED_PHY
- select VITESSE_PHY
- select GPIOLIB
- ---help---
- This enables support for the Vitesse VSC7385, VSC7388,
- VSC7395 and VSC7398 SparX integrated ethernet switches.
+source "drivers/net/dsa/vitesse/Kconfig"
-config NET_DSA_VITESSE_VSC73XX_SPI
- tristate "Vitesse VSC7385/7388/7395/7398 SPI mode support"
- depends on OF
- depends on NET_DSA
- depends on SPI
- select NET_DSA_VITESSE_VSC73XX
- ---help---
- This enables support for the Vitesse VSC7385, VSC7388, VSC7395
- and VSC7398 SparX integrated ethernet switches in SPI managed mode.
-
-config NET_DSA_VITESSE_VSC73XX_PLATFORM
- tristate "Vitesse VSC7385/7388/7395/7398 Platform mode support"
- depends on OF
- depends on NET_DSA
- depends on HAS_IOMEM
- select NET_DSA_VITESSE_VSC73XX
- ---help---
- This enables support for the Vitesse VSC7385, VSC7388, VSC7395
- and VSC7398 SparX integrated ethernet switches, connected over
- a CPU-attached address bus and work in memory-mapped I/O mode.
endmenu
diff --git a/drivers/net/dsa/Makefile b/drivers/net/dsa/Makefile
index ae70b79628d6..158d34f8c085 100644
--- a/drivers/net/dsa/Makefile
+++ b/drivers/net/dsa/Makefile
@@ -14,10 +14,8 @@ realtek-smi-objs := realtek-smi-core.o rtl8366.o rtl8366rb.o
obj-$(CONFIG_NET_DSA_SMSC_LAN9303) += lan9303-core.o
obj-$(CONFIG_NET_DSA_SMSC_LAN9303_I2C) += lan9303_i2c.o
obj-$(CONFIG_NET_DSA_SMSC_LAN9303_MDIO) += lan9303_mdio.o
-obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX) += vitesse-vsc73xx-core.o
-obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM) += vitesse-vsc73xx-platform.o
-obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_SPI) += vitesse-vsc73xx-spi.o
obj-y += b53/
obj-y += microchip/
obj-y += mv88e6xxx/
obj-y += sja1105/
+obj-y += vitesse/
diff --git a/drivers/net/dsa/vitesse/Kconfig b/drivers/net/dsa/vitesse/Kconfig
new file mode 100644
index 000000000000..54be4b34fd17
--- /dev/null
+++ b/drivers/net/dsa/vitesse/Kconfig
@@ -0,0 +1,31 @@
+config NET_DSA_VITESSE_VSC73XX
+ tristate
+ depends on OF
+ depends on NET_DSA
+ select FIXED_PHY
+ select VITESSE_PHY
+ select GPIOLIB
+ ---help---
+ This enables support for the Vitesse VSC7385, VSC7388,
+ VSC7395 and VSC7398 SparX integrated ethernet switches.
+
+config NET_DSA_VITESSE_VSC73XX_SPI
+ tristate "Vitesse VSC7385/7388/7395/7398 SPI mode support"
+ depends on OF
+ depends on NET_DSA
+ depends on SPI
+ select NET_DSA_VITESSE_VSC73XX
+ ---help---
+ This enables support for the Vitesse VSC7385, VSC7388, VSC7395
+ and VSC7398 SparX integrated ethernet switches in SPI managed mode.
+
+config NET_DSA_VITESSE_VSC73XX_PLATFORM
+ tristate "Vitesse VSC7385/7388/7395/7398 Platform mode support"
+ depends on OF
+ depends on NET_DSA
+ depends on HAS_IOMEM
+ select NET_DSA_VITESSE_VSC73XX
+ ---help---
+ This enables support for the Vitesse VSC7385, VSC7388, VSC7395
+ and VSC7398 SparX integrated ethernet switches, connected over
+ a CPU-attached address bus and work in memory-mapped I/O mode.
diff --git a/drivers/net/dsa/vitesse/Makefile b/drivers/net/dsa/vitesse/Makefile
new file mode 100644
index 000000000000..adceeeec5d12
--- /dev/null
+++ b/drivers/net/dsa/vitesse/Makefile
@@ -0,0 +1,3 @@
+obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX) += vsc73xx-core.o
+obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_PLATFORM) += vsc73xx-platform.o
+obj-$(CONFIG_NET_DSA_VITESSE_VSC73XX_SPI) += vsc73xx-spi.o
diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse/vsc73xx-core.c
similarity index 99%
rename from drivers/net/dsa/vitesse-vsc73xx-core.c
rename to drivers/net/dsa/vitesse/vsc73xx-core.c
index 42c1574d45f2..d44dc5821938 100644
--- a/drivers/net/dsa/vitesse-vsc73xx-core.c
+++ b/drivers/net/dsa/vitesse/vsc73xx-core.c
@@ -28,7 +28,7 @@
#include <linux/random.h>
#include <net/dsa.h>
-#include "vitesse-vsc73xx.h"
+#include "vsc73xx.h"
#define VSC73XX_BLOCK_MAC 0x1 /* Subblocks 0-4, 6 (CPU port) */
#define VSC73XX_BLOCK_ANALYZER 0x2 /* Only subblock 0 */
diff --git a/drivers/net/dsa/vitesse-vsc73xx-platform.c b/drivers/net/dsa/vitesse/vsc73xx-platform.c
similarity index 99%
rename from drivers/net/dsa/vitesse-vsc73xx-platform.c
rename to drivers/net/dsa/vitesse/vsc73xx-platform.c
index 0541785f9fee..0ccf622aff96 100644
--- a/drivers/net/dsa/vitesse-vsc73xx-platform.c
+++ b/drivers/net/dsa/vitesse/vsc73xx-platform.c
@@ -20,7 +20,7 @@
#include <linux/of.h>
#include <linux/platform_device.h>
-#include "vitesse-vsc73xx.h"
+#include "vsc73xx.h"
#define VSC73XX_CMD_PLATFORM_BLOCK_SHIFT 14
#define VSC73XX_CMD_PLATFORM_BLOCK_MASK 0x7
diff --git a/drivers/net/dsa/vitesse-vsc73xx-spi.c b/drivers/net/dsa/vitesse/vsc73xx-spi.c
similarity index 99%
rename from drivers/net/dsa/vitesse-vsc73xx-spi.c
rename to drivers/net/dsa/vitesse/vsc73xx-spi.c
index e73c8fcddc9f..d75fcee0defb 100644
--- a/drivers/net/dsa/vitesse-vsc73xx-spi.c
+++ b/drivers/net/dsa/vitesse/vsc73xx-spi.c
@@ -17,7 +17,7 @@
#include <linux/of.h>
#include <linux/spi/spi.h>
-#include "vitesse-vsc73xx.h"
+#include "vsc73xx.h"
#define VSC73XX_CMD_SPI_MODE_READ 0
#define VSC73XX_CMD_SPI_MODE_WRITE 1
diff --git a/drivers/net/dsa/vitesse-vsc73xx.h b/drivers/net/dsa/vitesse/vsc73xx.h
similarity index 100%
rename from drivers/net/dsa/vitesse-vsc73xx.h
rename to drivers/net/dsa/vitesse/vsc73xx.h
--
2.17.1
Powered by blists - more mailing lists