linux/drivers/net/mdio/mdio-mscc-miim.c

// SPDX-License-Identifier: (GPL-2.0 OR MIT)
/*
 * Driver for the MDIO interface of Microsemi network switches.
 *
 * Author: Alexandre Belloni <[email protected]>
 * Copyright (c) 2017 Microsemi Corporation
 */

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/mdio/mdio-mscc-miim.h>
#include <linux/mfd/ocelot.h>
#include <linux/module.h>
#include <linux/of_mdio.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/regmap.h>
#include <linux/reset.h>

#define MSCC_MIIM_REG_STATUS
#define MSCC_MIIM_STATUS_STAT_PENDING
#define MSCC_MIIM_STATUS_STAT_BUSY
#define MSCC_MIIM_REG_CMD
#define MSCC_MIIM_CMD_OPR_WRITE
#define MSCC_MIIM_CMD_OPR_READ
#define MSCC_MIIM_CMD_WRDATA_SHIFT
#define MSCC_MIIM_CMD_REGAD_SHIFT
#define MSCC_MIIM_CMD_PHYAD_SHIFT
#define MSCC_MIIM_CMD_VLD
#define MSCC_MIIM_REG_DATA
#define MSCC_MIIM_DATA_ERROR
#define MSCC_MIIM_REG_CFG
#define MSCC_MIIM_CFG_PRESCALE_MASK

#define MSCC_PHY_REG_PHY_CFG
#define PHY_CFG_PHY_ENA
#define PHY_CFG_PHY_COMMON_RESET
#define PHY_CFG_PHY_RESET
#define MSCC_PHY_REG_PHY_STATUS

#define LAN966X_CUPHY_COMMON_CFG
#define CUPHY_COMMON_CFG_RESET_N

struct mscc_miim_info {};

struct mscc_miim_dev {};

/* When high resolution timers aren't built-in: we can't use usleep_range() as
 * we would sleep way too long. Use udelay() instead.
 */
#define mscc_readx_poll_timeout(op, addr, val, cond, delay_us, timeout_us)

static int mscc_miim_status(struct mii_bus *bus)
{}

static int mscc_miim_wait_ready(struct mii_bus *bus)
{}

static int mscc_miim_wait_pending(struct mii_bus *bus)
{}

static int mscc_miim_read(struct mii_bus *bus, int mii_id, int regnum)
{}

static int mscc_miim_write(struct mii_bus *bus, int mii_id,
			   int regnum, u16 value)
{}

static int mscc_miim_reset(struct mii_bus *bus)
{}

static const struct regmap_config mscc_miim_regmap_config =;

static const struct regmap_config mscc_miim_phy_regmap_config =;

int mscc_miim_setup(struct device *dev, struct mii_bus **pbus, const char *name,
		    struct regmap *mii_regmap, int status_offset,
		    bool ignore_read_errors)
{}
EXPORT_SYMBOL();

static int mscc_miim_clk_set(struct mii_bus *bus)
{}

static int mscc_miim_probe(struct platform_device *pdev)
{}

static void mscc_miim_remove(struct platform_device *pdev)
{}

static const struct mscc_miim_info mscc_ocelot_miim_info =;

static const struct mscc_miim_info microchip_lan966x_miim_info =;

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

static struct platform_driver mscc_miim_driver =;

module_platform_driver();

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