Skip to content

Commit 2fa4e4b

Browse files
lunndavem330
authored andcommitted
net: pcs: Move XPCS into new PCS subdirectory
Create drivers/net/pcs and move the Synopsys DesignWare XPCS into the new directory. Move the header file into a subdirectory include/linux/pcs Start a naming convention of all PCS files use the prefix pcs-, and rename the XPCS files to fit. v2: Add include/linux/pcs v4: Fix include path in stmmac. Remove PCS_DEVICES to avoid new prompts Cc: Jose Abreu <Jose.Abreu@synopsys.com> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent f096658 commit 2fa4e4b

11 files changed

Lines changed: 33 additions & 16 deletions

File tree

‎MAINTAINERS‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6513,6 +6513,7 @@ F: Documentation/devicetree/bindings/net/ethernet-phy.yaml
65136513
F: Documentation/devicetree/bindings/net/mdio*
65146514
F: Documentation/devicetree/bindings/net/qca,ar803x.yaml
65156515
F: Documentation/networking/phy.rst
6516+
F: drivers/net/pcs/
65166517
F: drivers/net/phy/
65176518
F: drivers/of/of_mdio.c
65186519
F: drivers/of/of_net.c
@@ -16730,8 +16731,8 @@ SYNOPSYS DESIGNWARE ETHERNET XPCS DRIVER
1673016731
M: Jose Abreu <Jose.Abreu@synopsys.com>
1673116732
L: netdev@vger.kernel.org
1673216733
S: Supported
16733-
F: drivers/net/phy/mdio-xpcs.c
16734-
F: include/linux/mdio-xpcs.h
16734+
F: drivers/net/pcs/pcs-xpcs.c
16735+
F: include/linux/pcs/pcs-xpcs.h
1673516736

1673616737
SYNOPSYS DESIGNWARE I2C DRIVER
1673716738
M: Jarkko Nikula <jarkko.nikula@linux.intel.com>

‎drivers/net/Kconfig‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,8 @@ config NET_SB1000
473473

474474
source "drivers/net/phy/Kconfig"
475475

476+
source "drivers/net/pcs/Kconfig"
477+
476478
source "drivers/net/plip/Kconfig"
477479

478480
source "drivers/net/ppp/Kconfig"

‎drivers/net/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ obj-$(CONFIG_MDIO) += mdio.o
2121
obj-$(CONFIG_NET) += Space.o loopback.o
2222
obj-$(CONFIG_NETCONSOLE) += netconsole.o
2323
obj-y += phy/
24+
obj-y += pcs/
2425
obj-$(CONFIG_RIONET) += rionet.o
2526
obj-$(CONFIG_NET_TEAM) += team/
2627
obj-$(CONFIG_TUN) += tun.o

‎drivers/net/ethernet/stmicro/stmmac/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ config STMMAC_ETH
33
tristate "STMicroelectronics Multi-Gigabit Ethernet driver"
44
depends on HAS_IOMEM && HAS_DMA
55
select MII
6-
select MDIO_XPCS
6+
select PCS_XPCS
77
select PAGE_POOL
88
select PHYLINK
99
select CRC32

‎drivers/net/ethernet/stmicro/stmmac/common.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <linux/netdevice.h>
1616
#include <linux/stmmac.h>
1717
#include <linux/phy.h>
18-
#include <linux/mdio-xpcs.h>
18+
#include <linux/pcs/pcs-xpcs.h>
1919
#include <linux/module.h>
2020
#if IS_ENABLED(CONFIG_VLAN_8021Q)
2121
#define STMMAC_VLAN_TAG_USED

‎drivers/net/pcs/Kconfig‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SPDX-License-Identifier: GPL-2.0-only
2+
#
3+
# PCS Layer Configuration
4+
#
5+
6+
menu "PCS device drivers"
7+
8+
config PCS_XPCS
9+
tristate "Synopsys DesignWare XPCS controller"
10+
select MDIO_BUS
11+
depends on MDIO_DEVICE
12+
help
13+
This module provides helper functions for Synopsys DesignWare XPCS
14+
controllers.
15+
16+
endmenu

‎drivers/net/pcs/Makefile‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# SPDX-License-Identifier: GPL-2.0
2+
# Makefile for Linux PCS drivers
3+
4+
obj-$(CONFIG_PCS_XPCS) += pcs-xpcs.o
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
*/
88

99
#include <linux/delay.h>
10+
#include <linux/pcs/pcs-xpcs.h>
1011
#include <linux/mdio.h>
11-
#include <linux/mdio-xpcs.h>
1212
#include <linux/phylink.h>
1313
#include <linux/workqueue.h>
1414

‎drivers/net/phy/Kconfig‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -234,12 +234,6 @@ config MDIO_XGENE
234234
This module provides a driver for the MDIO busses found in the
235235
APM X-Gene SoC's.
236236

237-
config MDIO_XPCS
238-
tristate "Synopsys DesignWare XPCS controller"
239-
help
240-
This module provides helper functions for Synopsys DesignWare XPCS
241-
controllers.
242-
243237
endif
244238
endif
245239

‎drivers/net/phy/Makefile‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ obj-$(CONFIG_MDIO_OCTEON) += mdio-octeon.o
4747
obj-$(CONFIG_MDIO_SUN4I) += mdio-sun4i.o
4848
obj-$(CONFIG_MDIO_THUNDER) += mdio-thunder.o
4949
obj-$(CONFIG_MDIO_XGENE) += mdio-xgene.o
50-
obj-$(CONFIG_MDIO_XPCS) += mdio-xpcs.o
5150

5251
obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += mii_timestamper.o
5352

0 commit comments

Comments
 (0)