linux/drivers/net/pcs/pcs-xpcs.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (c) 2020 Synopsys, Inc. and/or its affiliates.
 * Synopsys DesignWare XPCS helpers
 *
 * Author: Jose Abreu <[email protected]>
 */

#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/pcs/pcs-xpcs.h>
#include <linux/mdio.h>
#include <linux/phy.h>
#include <linux/phylink.h>
#include <linux/property.h>

#include "pcs-xpcs.h"

#define phylink_pcs_to_xpcs(pl_pcs)

static const int xpcs_usxgmii_features[] =;

static const int xpcs_10gkr_features[] =;

static const int xpcs_xlgmii_features[] =;

static const int xpcs_10gbaser_features[] =;

static const int xpcs_sgmii_features[] =;

static const int xpcs_1000basex_features[] =;

static const int xpcs_2500basex_features[] =;

static const phy_interface_t xpcs_usxgmii_interfaces[] =;

static const phy_interface_t xpcs_10gkr_interfaces[] =;

static const phy_interface_t xpcs_xlgmii_interfaces[] =;

static const phy_interface_t xpcs_10gbaser_interfaces[] =;

static const phy_interface_t xpcs_sgmii_interfaces[] =;

static const phy_interface_t xpcs_1000basex_interfaces[] =;

static const phy_interface_t xpcs_2500basex_interfaces[] =;

enum {};

struct dw_xpcs_compat {};

struct dw_xpcs_desc {};

static const struct dw_xpcs_compat *
xpcs_find_compat(const struct dw_xpcs_desc *desc, phy_interface_t interface)
{}

int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface)
{}
EXPORT_SYMBOL_GPL();

static bool __xpcs_linkmode_supported(const struct dw_xpcs_compat *compat,
				      enum ethtool_link_mode_bit_indices linkmode)
{}

#define xpcs_linkmode_supported(compat, mode)

int xpcs_read(struct dw_xpcs *xpcs, int dev, u32 reg)
{}

int xpcs_write(struct dw_xpcs *xpcs, int dev, u32 reg, u16 val)
{}

static int xpcs_modify_changed(struct dw_xpcs *xpcs, int dev, u32 reg,
			       u16 mask, u16 set)
{}

static int xpcs_read_vendor(struct dw_xpcs *xpcs, int dev, u32 reg)
{}

static int xpcs_write_vendor(struct dw_xpcs *xpcs, int dev, int reg,
			     u16 val)
{}

int xpcs_read_vpcs(struct dw_xpcs *xpcs, int reg)
{}

int xpcs_write_vpcs(struct dw_xpcs *xpcs, int reg, u16 val)
{}

static int xpcs_poll_reset(struct dw_xpcs *xpcs, int dev)
{}

static int xpcs_soft_reset(struct dw_xpcs *xpcs,
			   const struct dw_xpcs_compat *compat)
{}

#define xpcs_warn(__xpcs, __state, __args...)

static int xpcs_read_fault_c73(struct dw_xpcs *xpcs,
			       struct phylink_link_state *state,
			       u16 pcs_stat1)
{}

static void xpcs_config_usxgmii(struct dw_xpcs *xpcs, int speed)
{}

static int _xpcs_config_aneg_c73(struct dw_xpcs *xpcs,
				 const struct dw_xpcs_compat *compat)
{}

static int xpcs_config_aneg_c73(struct dw_xpcs *xpcs,
				const struct dw_xpcs_compat *compat)
{}

static int xpcs_aneg_done_c73(struct dw_xpcs *xpcs,
			      struct phylink_link_state *state,
			      const struct dw_xpcs_compat *compat, u16 an_stat1)
{}

static int xpcs_read_lpa_c73(struct dw_xpcs *xpcs,
			     struct phylink_link_state *state, u16 an_stat1)
{}

static int xpcs_get_max_xlgmii_speed(struct dw_xpcs *xpcs,
				     struct phylink_link_state *state)
{}

static void xpcs_resolve_pma(struct dw_xpcs *xpcs,
			     struct phylink_link_state *state)
{}

static int xpcs_validate(struct phylink_pcs *pcs, unsigned long *supported,
			 const struct phylink_link_state *state)
{}

void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces)
{}
EXPORT_SYMBOL_GPL();

int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns, int enable)
{}
EXPORT_SYMBOL_GPL();

static int xpcs_config_aneg_c37_sgmii(struct dw_xpcs *xpcs,
				      unsigned int neg_mode)
{}

static int xpcs_config_aneg_c37_1000basex(struct dw_xpcs *xpcs,
					  unsigned int neg_mode,
					  const unsigned long *advertising)
{}

static int xpcs_config_2500basex(struct dw_xpcs *xpcs)
{}

int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface,
		   const unsigned long *advertising, unsigned int neg_mode)
{}
EXPORT_SYMBOL_GPL();

static int xpcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
		       phy_interface_t interface,
		       const unsigned long *advertising,
		       bool permit_pause_to_mac)
{}

static int xpcs_get_state_c73(struct dw_xpcs *xpcs,
			      struct phylink_link_state *state,
			      const struct dw_xpcs_compat *compat)
{}

static int xpcs_get_state_c37_sgmii(struct dw_xpcs *xpcs,
				    struct phylink_link_state *state)
{}

static int xpcs_get_state_c37_1000basex(struct dw_xpcs *xpcs,
					struct phylink_link_state *state)
{}

static int xpcs_get_state_2500basex(struct dw_xpcs *xpcs,
				    struct phylink_link_state *state)
{}

static void xpcs_get_state(struct phylink_pcs *pcs,
			   struct phylink_link_state *state)
{}

static void xpcs_link_up_sgmii(struct dw_xpcs *xpcs, unsigned int neg_mode,
			       int speed, int duplex)
{}

static void xpcs_link_up_1000basex(struct dw_xpcs *xpcs, unsigned int neg_mode,
				   int speed, int duplex)
{}

void xpcs_link_up(struct phylink_pcs *pcs, unsigned int neg_mode,
		  phy_interface_t interface, int speed, int duplex)
{}
EXPORT_SYMBOL_GPL();

static void xpcs_an_restart(struct phylink_pcs *pcs)
{}

static int xpcs_get_id(struct dw_xpcs *xpcs)
{}

static const struct dw_xpcs_compat synopsys_xpcs_compat[DW_XPCS_INTERFACE_MAX] =;

static const struct dw_xpcs_compat nxp_sja1105_xpcs_compat[DW_XPCS_INTERFACE_MAX] =;

static const struct dw_xpcs_compat nxp_sja1110_xpcs_compat[DW_XPCS_INTERFACE_MAX] =;

static const struct dw_xpcs_desc xpcs_desc_list[] =;

static const struct phylink_pcs_ops xpcs_phylink_ops =;

static struct dw_xpcs *xpcs_create_data(struct mdio_device *mdiodev)
{}

static void xpcs_free_data(struct dw_xpcs *xpcs)
{}

static int xpcs_init_clks(struct dw_xpcs *xpcs)
{}

static void xpcs_clear_clks(struct dw_xpcs *xpcs)
{}

static int xpcs_init_id(struct dw_xpcs *xpcs)
{}

static int xpcs_init_iface(struct dw_xpcs *xpcs, phy_interface_t interface)
{}

static struct dw_xpcs *xpcs_create(struct mdio_device *mdiodev,
				   phy_interface_t interface)
{}

/**
 * xpcs_create_mdiodev() - create a DW xPCS instance with the MDIO @addr
 * @bus: pointer to the MDIO-bus descriptor for the device to be looked at
 * @addr: device MDIO-bus ID
 * @interface: requested PHY interface
 *
 * Return: a pointer to the DW XPCS handle if successful, otherwise -ENODEV if
 * the PCS device couldn't be found on the bus and other negative errno related
 * to the data allocation and MDIO-bus communications.
 */
struct dw_xpcs *xpcs_create_mdiodev(struct mii_bus *bus, int addr,
				    phy_interface_t interface)
{}
EXPORT_SYMBOL_GPL();

/**
 * xpcs_create_fwnode() - Create a DW xPCS instance from @fwnode
 * @fwnode: fwnode handle poining to the DW XPCS device
 * @interface: requested PHY interface
 *
 * Return: a pointer to the DW XPCS handle if successful, otherwise -ENODEV if
 * the fwnode device is unavailable or the PCS device couldn't be found on the
 * bus, -EPROBE_DEFER if the respective MDIO-device instance couldn't be found,
 * other negative errno related to the data allocations and MDIO-bus
 * communications.
 */
struct dw_xpcs *xpcs_create_fwnode(struct fwnode_handle *fwnode,
				   phy_interface_t interface)
{}
EXPORT_SYMBOL_GPL();

void xpcs_destroy(struct dw_xpcs *xpcs)
{}
EXPORT_SYMBOL_GPL();

MODULE_DESCRIPTION();
MODULE_LICENSE();