diff options
author | Ioana Ciornei <ioana.ciornei@nxp.com> | 2020-08-30 11:34:01 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-31 22:52:33 +0300 |
commit | 0da4c3d393e40e41e3c6b9f1cebaa498512c2abb (patch) | |
tree | 467566432812bff0f2bbb9aafae57e0415cb0549 /include/linux/pcs-lynx.h | |
parent | 2dab432c5ae4f9c8eab3132ac0e9facf498ead92 (diff) | |
download | linux-0da4c3d393e40e41e3c6b9f1cebaa498512c2abb.tar.xz |
net: phy: add Lynx PCS module
Add a Lynx PCS module which exposes the necessary operations to drive
the PCS using phylink.
The majority of the code is extracted from the Felix DSA driver, which
will be also modified in a later patch, and exposed as a separate module
for code reusability purposes.
As such, this aims at feature and bug parity with the existing Felix DSA
driver, and thus USXGMII, SGMII, QSGMII and 2500Base-X (only w/o in-band
AN) are supported by the Lynx PCS module since these were also supported
by Felix.
The module can only be enabled by the drivers in need and not user
selectable.
Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/pcs-lynx.h')
-rw-r--r-- | include/linux/pcs-lynx.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/linux/pcs-lynx.h b/include/linux/pcs-lynx.h new file mode 100644 index 000000000000..a6440d6ebe95 --- /dev/null +++ b/include/linux/pcs-lynx.h @@ -0,0 +1,21 @@ +/* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */ +/* Copyright 2020 NXP + * Lynx PCS helpers + */ + +#ifndef __LINUX_PCS_LYNX_H +#define __LINUX_PCS_LYNX_H + +#include <linux/mdio.h> +#include <linux/phylink.h> + +struct lynx_pcs { + struct phylink_pcs pcs; + struct mdio_device *mdio; +}; + +struct lynx_pcs *lynx_pcs_create(struct mdio_device *mdio); + +void lynx_pcs_destroy(struct lynx_pcs *pcs); + +#endif /* __LINUX_PCS_LYNX_H */ |