linux/drivers/net/ethernet/ti/davinci_mdio.c

// SPDX-License-Identifier: GPL-2.0+
/*
 * DaVinci MDIO Module driver
 *
 * Copyright (C) 2010 Texas Instruments.
 *
 * Shamelessly ripped out of davinci_emac.c, original copyrights follow:
 *
 * Copyright (C) 2009 Texas Instruments.
 *
 */
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/phy.h>
#include <linux/clk.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/pm_runtime.h>
#include <linux/davinci_emac.h>
#include <linux/of.h>
#include <linux/of_mdio.h>
#include <linux/pinctrl/consumer.h>
#include <linux/mdio-bitbang.h>
#include <linux/sys_soc.h>

/*
 * This timeout definition is a worst-case ultra defensive measure against
 * unexpected controller lock ups.  Ideally, we should never ever hit this
 * scenario in practice.
 */
#define MDIO_TIMEOUT

#define PHY_REG_MASK
#define PHY_ID_MASK

#define DEF_OUT_FREQ

struct davinci_mdio_of_param {};

struct davinci_mdio_regs {};

static const struct mdio_platform_data default_pdata =;

struct davinci_mdio_data {};

static void davinci_mdio_init_clk(struct davinci_mdio_data *data)
{}

static void davinci_mdio_enable(struct davinci_mdio_data *data)
{}

static void davinci_mdio_disable(struct davinci_mdio_data *data)
{}

static void davinci_mdio_enable_manual_mode(struct davinci_mdio_data *data)
{}

static void davinci_set_mdc(struct mdiobb_ctrl *ctrl, int level)
{}

static void davinci_set_mdio_dir(struct mdiobb_ctrl *ctrl, int output)
{}

static void  davinci_set_mdio_data(struct mdiobb_ctrl *ctrl, int value)
{}

static int davinci_get_mdio_data(struct mdiobb_ctrl *ctrl)
{}

static int davinci_mdiobb_read_c22(struct mii_bus *bus, int phy, int reg)
{}

static int davinci_mdiobb_write_c22(struct mii_bus *bus, int phy, int reg,
				    u16 val)
{}

static int davinci_mdiobb_read_c45(struct mii_bus *bus, int phy, int devad,
				   int reg)
{}

static int davinci_mdiobb_write_c45(struct mii_bus *bus, int phy, int devad,
				    int reg, u16 val)
{}

static int davinci_mdio_common_reset(struct davinci_mdio_data *data)
{}

static int davinci_mdio_reset(struct mii_bus *bus)
{}

static int davinci_mdiobb_reset(struct mii_bus *bus)
{}

/* wait until hardware is ready for another user access */
static inline int wait_for_user_access(struct davinci_mdio_data *data)
{}

/* wait until hardware state machine is idle */
static inline int wait_for_idle(struct davinci_mdio_data *data)
{}

static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg)
{}

static int davinci_mdio_write(struct mii_bus *bus, int phy_id,
			      int phy_reg, u16 phy_data)
{}

static int davinci_mdio_probe_dt(struct mdio_platform_data *data,
			 struct platform_device *pdev)
{}

struct k3_mdio_soc_data {};

static const struct k3_mdio_soc_data am65_mdio_soc_data =;

static const struct soc_device_attribute k3_mdio_socinfo[] =;

#if IS_ENABLED(CONFIG_OF)
static const struct davinci_mdio_of_param of_cpsw_mdio_data =;

static const struct of_device_id davinci_mdio_of_mtable[] =;
MODULE_DEVICE_TABLE(of, davinci_mdio_of_mtable);
#endif

static const struct mdiobb_ops davinci_mdiobb_ops =;

static int davinci_mdio_probe(struct platform_device *pdev)
{}

static void davinci_mdio_remove(struct platform_device *pdev)
{}

#ifdef CONFIG_PM
static int davinci_mdio_runtime_suspend(struct device *dev)
{}

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

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

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

static const struct dev_pm_ops davinci_mdio_pm_ops =;

static struct platform_driver davinci_mdio_driver =;

static int __init davinci_mdio_init(void)
{}
device_initcall(davinci_mdio_init);

static void __exit davinci_mdio_exit(void)
{}
module_exit(davinci_mdio_exit);

MODULE_LICENSE();
MODULE_DESCRIPTION();