linux/drivers/net/mdio/mdio-mux-bcm-iproc.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright 2016 Broadcom
 */
#include <linux/align.h>
#include <linux/clk.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/iopoll.h>
#include <linux/mdio-mux.h>
#include <linux/module.h>
#include <linux/of_mdio.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/sizes.h>

#define MDIO_RATE_ADJ_EXT_OFFSET
#define MDIO_RATE_ADJ_INT_OFFSET
#define MDIO_RATE_ADJ_DIVIDENT_SHIFT

#define MDIO_SCAN_CTRL_OFFSET
#define MDIO_SCAN_CTRL_OVRIDE_EXT_MSTR

#define MDIO_PARAM_OFFSET
#define MDIO_PARAM_MIIM_CYCLE
#define MDIO_PARAM_INTERNAL_SEL
#define MDIO_PARAM_BUS_ID
#define MDIO_PARAM_C45_SEL
#define MDIO_PARAM_PHY_ID
#define MDIO_PARAM_PHY_DATA

#define MDIO_READ_OFFSET
#define MDIO_READ_DATA_MASK
#define MDIO_ADDR_OFFSET

#define MDIO_CTRL_OFFSET
#define MDIO_CTRL_WRITE_OP
#define MDIO_CTRL_READ_OP

#define MDIO_STAT_OFFSET
#define MDIO_STAT_DONE

#define BUS_MAX_ADDR
#define EXT_BUS_START_ADDR

#define MDIO_REG_ADDR_SPACE_SIZE

#define MDIO_OPERATING_FREQUENCY
#define MDIO_RATE_ADJ_DIVIDENT

struct iproc_mdiomux_desc {};

static void mdio_mux_iproc_config(struct iproc_mdiomux_desc *md)
{}

static int iproc_mdio_wait_for_idle(void __iomem *base, bool result)
{}

/* start_miim_ops- Program and start MDIO transaction over mdio bus.
 * @base: Base address
 * @phyid: phyid of the selected bus.
 * @reg: register offset to be read/written.
 * @val :0 if read op else value to be written in @reg;
 * @op: Operation that need to be carried out.
 *      MDIO_CTRL_READ_OP: Read transaction.
 *      MDIO_CTRL_WRITE_OP: Write transaction.
 *
 * Return value: Successful Read operation returns read reg values and write
 *      operation returns 0. Failure operation returns negative error code.
 */
static int start_miim_ops(void __iomem *base, bool c45,
			  u16 phyid, u32 reg, u16 val, u32 op)
{}

static int iproc_mdiomux_read_c22(struct mii_bus *bus, int phyid, int reg)
{}

static int iproc_mdiomux_read_c45(struct mii_bus *bus, int phyid, int devad,
				  int reg)
{}

static int iproc_mdiomux_write_c22(struct mii_bus *bus,
				   int phyid, int reg, u16 val)
{}

static int iproc_mdiomux_write_c45(struct mii_bus *bus,
				   int phyid, int devad, int reg, u16 val)
{}

static int mdio_mux_iproc_switch_fn(int current_child, int desired_child,
				    void *data)
{}

static int mdio_mux_iproc_probe(struct platform_device *pdev)
{}

static void mdio_mux_iproc_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM_SLEEP
static int mdio_mux_iproc_suspend(struct device *dev)
{}

static int mdio_mux_iproc_resume(struct device *dev)
{}
#endif

static SIMPLE_DEV_PM_OPS(mdio_mux_iproc_pm_ops,
			 mdio_mux_iproc_suspend, mdio_mux_iproc_resume);

static const struct of_device_id mdio_mux_iproc_match[] =;
MODULE_DEVICE_TABLE(of, mdio_mux_iproc_match);

static struct platform_driver mdiomux_iproc_driver =;

module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();