Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Andrew Lunn and committed by
David S. Miller
2fa4e4b7 f0966581

+33 -16
+3 -2
MAINTAINERS
··· 6513 6513 F: Documentation/devicetree/bindings/net/mdio* 6514 6514 F: Documentation/devicetree/bindings/net/qca,ar803x.yaml 6515 6515 F: Documentation/networking/phy.rst 6516 + F: drivers/net/pcs/ 6516 6517 F: drivers/net/phy/ 6517 6518 F: drivers/of/of_mdio.c 6518 6519 F: drivers/of/of_net.c ··· 16731 16730 M: Jose Abreu <Jose.Abreu@synopsys.com> 16732 16731 L: netdev@vger.kernel.org 16733 16732 S: Supported 16734 - F: drivers/net/phy/mdio-xpcs.c 16735 - F: include/linux/mdio-xpcs.h 16733 + F: drivers/net/pcs/pcs-xpcs.c 16734 + F: include/linux/pcs/pcs-xpcs.h 16736 16735 16737 16736 SYNOPSYS DESIGNWARE I2C DRIVER 16738 16737 M: Jarkko Nikula <jarkko.nikula@linux.intel.com>
+2
drivers/net/Kconfig
··· 473 473 474 474 source "drivers/net/phy/Kconfig" 475 475 476 + source "drivers/net/pcs/Kconfig" 477 + 476 478 source "drivers/net/plip/Kconfig" 477 479 478 480 source "drivers/net/ppp/Kconfig"
+1
drivers/net/Makefile
··· 21 21 obj-$(CONFIG_NET) += Space.o loopback.o 22 22 obj-$(CONFIG_NETCONSOLE) += netconsole.o 23 23 obj-y += phy/ 24 + obj-y += pcs/ 24 25 obj-$(CONFIG_RIONET) += rionet.o 25 26 obj-$(CONFIG_NET_TEAM) += team/ 26 27 obj-$(CONFIG_TUN) += tun.o
+1 -1
drivers/net/ethernet/stmicro/stmmac/Kconfig
··· 3 3 tristate "STMicroelectronics Multi-Gigabit Ethernet driver" 4 4 depends on HAS_IOMEM && HAS_DMA 5 5 select MII 6 - select MDIO_XPCS 6 + select PCS_XPCS 7 7 select PAGE_POOL 8 8 select PHYLINK 9 9 select CRC32
+1 -1
drivers/net/ethernet/stmicro/stmmac/common.h
··· 15 15 #include <linux/netdevice.h> 16 16 #include <linux/stmmac.h> 17 17 #include <linux/phy.h> 18 - #include <linux/mdio-xpcs.h> 18 + #include <linux/pcs/pcs-xpcs.h> 19 19 #include <linux/module.h> 20 20 #if IS_ENABLED(CONFIG_VLAN_8021Q) 21 21 #define STMMAC_VLAN_TAG_USED
+16
drivers/net/pcs/Kconfig
··· 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
+4
drivers/net/pcs/Makefile
··· 1 + # SPDX-License-Identifier: GPL-2.0 2 + # Makefile for Linux PCS drivers 3 + 4 + obj-$(CONFIG_PCS_XPCS) += pcs-xpcs.o
-6
drivers/net/phy/Kconfig
··· 234 234 This module provides a driver for the MDIO busses found in the 235 235 APM X-Gene SoC's. 236 236 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 - 243 237 endif 244 238 endif 245 239
-1
drivers/net/phy/Makefile
··· 47 47 obj-$(CONFIG_MDIO_SUN4I) += mdio-sun4i.o 48 48 obj-$(CONFIG_MDIO_THUNDER) += mdio-thunder.o 49 49 obj-$(CONFIG_MDIO_XGENE) += mdio-xgene.o 50 - obj-$(CONFIG_MDIO_XPCS) += mdio-xpcs.o 51 50 52 51 obj-$(CONFIG_NETWORK_PHY_TIMESTAMPING) += mii_timestamper.o 53 52
+1 -1
drivers/net/phy/mdio-xpcs.c drivers/net/pcs/pcs-xpcs.c
··· 7 7 */ 8 8 9 9 #include <linux/delay.h> 10 + #include <linux/pcs/pcs-xpcs.h> 10 11 #include <linux/mdio.h> 11 - #include <linux/mdio-xpcs.h> 12 12 #include <linux/phylink.h> 13 13 #include <linux/workqueue.h> 14 14
+4 -4
include/linux/mdio-xpcs.h include/linux/pcs/pcs-xpcs.h
··· 4 4 * Synopsys DesignWare XPCS helpers 5 5 */ 6 6 7 - #ifndef __LINUX_MDIO_XPCS_H 8 - #define __LINUX_MDIO_XPCS_H 7 + #ifndef __LINUX_PCS_XPCS_H 8 + #define __LINUX_PCS_XPCS_H 9 9 10 10 #include <linux/phy.h> 11 11 #include <linux/phylink.h> ··· 29 29 int (*probe)(struct mdio_xpcs_args *xpcs, phy_interface_t interface); 30 30 }; 31 31 32 - #if IS_ENABLED(CONFIG_MDIO_XPCS) 32 + #if IS_ENABLED(CONFIG_PCS_XPCS) 33 33 struct mdio_xpcs_ops *mdio_xpcs_get_ops(void); 34 34 #else 35 35 static inline struct mdio_xpcs_ops *mdio_xpcs_get_ops(void) ··· 38 38 } 39 39 #endif 40 40 41 - #endif /* __LINUX_MDIO_XPCS_H */ 41 + #endif /* __LINUX_PCS_XPCS_H */