linux/drivers/net/mdio/mdio-ipq4019.c

// SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
/* Copyright (c) 2015, The Linux Foundation. All rights reserved. */
/* Copyright (c) 2020 Sartura Ltd. */

#include <linux/delay.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/of_mdio.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/clk.h>

#define MDIO_MODE_REG
#define MDIO_MODE_MDC_MODE
/* 0 = Clause 22, 1 = Clause 45 */
#define MDIO_MODE_C45
#define MDIO_MODE_DIV_MASK
#define MDIO_MODE_DIV(x)
#define MDIO_MODE_DIV_1
#define MDIO_MODE_DIV_2
#define MDIO_MODE_DIV_4
#define MDIO_MODE_DIV_8
#define MDIO_MODE_DIV_16
#define MDIO_MODE_DIV_32
#define MDIO_MODE_DIV_64
#define MDIO_MODE_DIV_128
#define MDIO_MODE_DIV_256
#define MDIO_ADDR_REG
#define MDIO_DATA_WRITE_REG
#define MDIO_DATA_READ_REG
#define MDIO_CMD_REG
#define MDIO_CMD_ACCESS_BUSY
#define MDIO_CMD_ACCESS_START
#define MDIO_CMD_ACCESS_CODE_READ
#define MDIO_CMD_ACCESS_CODE_WRITE
#define MDIO_CMD_ACCESS_CODE_C45_ADDR
#define MDIO_CMD_ACCESS_CODE_C45_WRITE
#define MDIO_CMD_ACCESS_CODE_C45_READ

#define IPQ4019_MDIO_TIMEOUT
#define IPQ4019_MDIO_SLEEP

/* MDIO clock source frequency is fixed to 100M */
#define IPQ_MDIO_CLK_RATE

#define IPQ_PHY_SET_DELAY_US

struct ipq4019_mdio_data {};

static int ipq4019_mdio_wait_busy(struct mii_bus *bus)
{}

static int ipq4019_mdio_read_c45(struct mii_bus *bus, int mii_id, int mmd,
				 int reg)
{}

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

static int ipq4019_mdio_write_c45(struct mii_bus *bus, int mii_id, int mmd,
				  int reg, u16 value)
{}

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

static int ipq4019_mdio_set_div(struct ipq4019_mdio_data *priv)
{}

static int ipq_mdio_reset(struct mii_bus *bus)
{}

static void ipq4019_mdio_select_mdc_rate(struct platform_device *pdev,
					 struct ipq4019_mdio_data *priv)
{}

static int ipq4019_mdio_probe(struct platform_device *pdev)
{}

static void ipq4019_mdio_remove(struct platform_device *pdev)
{}

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

static struct platform_driver ipq4019_mdio_driver =;

module_platform_driver();

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