linux/drivers/net/dsa/mv88e6xxx/pcs-6352.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Marvell 88E6352 family SERDES PCS support
 *
 * Copyright (c) 2008 Marvell Semiconductor
 *
 * Copyright (c) 2017 Andrew Lunn <[email protected]>
 */
#include <linux/phylink.h>

#include "global2.h"
#include "port.h"
#include "serdes.h"

/* Definitions from drivers/net/phy/marvell.c, which would be good to reuse. */
#define MII_M1011_PHY_STATUS
#define MII_M1011_IMASK
#define MII_M1011_IMASK_LINK_CHANGE
#define MII_M1011_IEVENT
#define MII_M1011_IEVENT_LINK_CHANGE
#define MII_MARVELL_PHY_PAGE
#define MII_MARVELL_FIBER_PAGE

struct marvell_c22_pcs {};

static struct marvell_c22_pcs *pcs_to_marvell_c22_pcs(struct phylink_pcs *pcs)
{}

static int marvell_c22_pcs_set_fiber_page(struct marvell_c22_pcs *mpcs)
{}

static int marvell_c22_pcs_restore_page(struct marvell_c22_pcs *mpcs,
					int oldpage, int ret)
{}

static irqreturn_t marvell_c22_pcs_handle_irq(int irq, void *dev_id)
{}

static int marvell_c22_pcs_modify(struct marvell_c22_pcs *mpcs, u8 reg,
				  u16 mask, u16 val)
{}

static int marvell_c22_pcs_power(struct marvell_c22_pcs *mpcs,
				 bool on)
{}

static int marvell_c22_pcs_control_irq(struct marvell_c22_pcs *mpcs,
				       bool enable)
{}

static int marvell_c22_pcs_enable(struct phylink_pcs *pcs)
{}

static void marvell_c22_pcs_disable(struct phylink_pcs *pcs)
{}

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

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

static void marvell_c22_pcs_an_restart(struct phylink_pcs *pcs)
{}

static void marvell_c22_pcs_link_up(struct phylink_pcs *pcs, unsigned int mode,
				    phy_interface_t interface, int speed,
				    int duplex)
{}

static const struct phylink_pcs_ops marvell_c22_pcs_ops =;

static struct marvell_c22_pcs *marvell_c22_pcs_alloc(struct device *dev,
						     struct mii_bus *bus,
						     unsigned int addr)
{}

static int marvell_c22_pcs_setup_irq(struct marvell_c22_pcs *mpcs,
				     unsigned int irq)
{}

/* mv88e6352 specifics */

static bool mv88e6352_pcs_link_check(struct marvell_c22_pcs *mpcs)
{}

static int mv88e6352_pcs_init(struct mv88e6xxx_chip *chip, int port)
{}

static void mv88e6352_pcs_teardown(struct mv88e6xxx_chip *chip, int port)
{}

static struct phylink_pcs *mv88e6352_pcs_select(struct mv88e6xxx_chip *chip,
						int port,
						phy_interface_t interface)
{}

const struct mv88e6xxx_pcs_ops mv88e6352_pcs_ops =;