#include <linux/module.h>
#include <linux/phy.h>
#include <linux/delay.h>
#include <linux/mdio.h>
#include <linux/marvell_phy.h>
#include <linux/of.h>
#include <linux/sfp.h>
#include <linux/netdevice.h>
#define MV_PCS_CONFIG …
#define MV_PCS_HOST_XAUI …
#define MV_PCS_LINE_10GBR …
#define MV_PCS_LINE_1GBX_AN …
#define MV_PCS_LINE_SGMII_AN …
#define MV_PORT_RST …
#define MV_LINE_RST_SW …
#define MV_HOST_RST_SW …
#define MV_PORT_RST_SW …
#define MV_RX_SIGNAL_DETECT …
#define MV_RX_SIGNAL_DETECT_GLOBAL …
#define MV_1GBX_CTRL …
#define MV_1GBX_STAT …
#define MV_1GBX_ADVERTISE …
#define MV_1GBX_PHY_STAT …
#define MV_1GBX_PHY_STAT_AN_RESOLVED …
#define MV_1GBX_PHY_STAT_DUPLEX …
#define MV_1GBX_PHY_STAT_SPEED100 …
#define MV_1GBX_PHY_STAT_SPEED1000 …
#define AUTONEG_TIMEOUT …
struct mv2222_data { … };
static int mv2222_tx_enable(struct phy_device *phydev)
{ … }
static int mv2222_tx_disable(struct phy_device *phydev)
{ … }
static int mv2222_soft_reset(struct phy_device *phydev)
{ … }
static int mv2222_disable_aneg(struct phy_device *phydev)
{ … }
static int mv2222_enable_aneg(struct phy_device *phydev)
{ … }
static int mv2222_set_sgmii_speed(struct phy_device *phydev)
{ … }
static bool mv2222_is_10g_capable(struct phy_device *phydev)
{ … }
static bool mv2222_is_1gbx_capable(struct phy_device *phydev)
{ … }
static bool mv2222_is_sgmii_capable(struct phy_device *phydev)
{ … }
static int mv2222_config_line(struct phy_device *phydev)
{ … }
static int mv2222_swap_line_type(struct phy_device *phydev)
{ … }
static int mv2222_setup_forced(struct phy_device *phydev)
{ … }
static int mv2222_config_aneg(struct phy_device *phydev)
{ … }
static int mv2222_aneg_done(struct phy_device *phydev)
{ … }
static int mv2222_read_status_10g(struct phy_device *phydev)
{ … }
static int mv2222_read_status_1g(struct phy_device *phydev)
{ … }
static bool mv2222_link_is_operational(struct phy_device *phydev)
{ … }
static int mv2222_read_status(struct phy_device *phydev)
{ … }
static int mv2222_resume(struct phy_device *phydev)
{ … }
static int mv2222_suspend(struct phy_device *phydev)
{ … }
static int mv2222_get_features(struct phy_device *phydev)
{ … }
static int mv2222_config_init(struct phy_device *phydev)
{ … }
static int mv2222_sfp_insert(void *upstream, const struct sfp_eeprom_id *id)
{ … }
static void mv2222_sfp_remove(void *upstream)
{ … }
static void mv2222_sfp_link_up(void *upstream)
{ … }
static void mv2222_sfp_link_down(void *upstream)
{ … }
static const struct sfp_upstream_ops sfp_phy_ops = …;
static int mv2222_probe(struct phy_device *phydev)
{ … }
static struct phy_driver mv2222_drivers[] = …;
module_phy_driver(mv2222_drivers);
static struct mdio_device_id __maybe_unused mv2222_tbl[] = …;
MODULE_DEVICE_TABLE(mdio, mv2222_tbl);
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;