linux/drivers/net/phy/realtek.c

// SPDX-License-Identifier: GPL-2.0+
/* drivers/net/phy/realtek.c
 *
 * Driver for Realtek PHYs
 *
 * Author: Johnson Leung <[email protected]>
 *
 * Copyright (c) 2004 Freescale Semiconductor, Inc.
 */
#include <linux/bitops.h>
#include <linux/of.h>
#include <linux/phy.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/clk.h>

#define RTL821x_PHYSR
#define RTL821x_PHYSR_DUPLEX
#define RTL821x_PHYSR_SPEED

#define RTL821x_INER
#define RTL8211B_INER_INIT
#define RTL8211E_INER_LINK_STATUS
#define RTL8211F_INER_LINK_STATUS

#define RTL821x_INSR

#define RTL821x_EXT_PAGE_SELECT
#define RTL821x_PAGE_SELECT

#define RTL8211F_PHYCR1
#define RTL8211F_PHYCR2
#define RTL8211F_INSR

#define RTL8211F_LEDCR
#define RTL8211F_LEDCR_MODE
#define RTL8211F_LEDCR_ACT_TXRX
#define RTL8211F_LEDCR_LINK_1000
#define RTL8211F_LEDCR_LINK_100
#define RTL8211F_LEDCR_LINK_10
#define RTL8211F_LEDCR_MASK
#define RTL8211F_LEDCR_SHIFT

#define RTL8211F_TX_DELAY
#define RTL8211F_RX_DELAY

#define RTL8211F_ALDPS_PLL_OFF
#define RTL8211F_ALDPS_ENABLE
#define RTL8211F_ALDPS_XTAL_OFF

#define RTL8211E_CTRL_DELAY
#define RTL8211E_TX_DELAY
#define RTL8211E_RX_DELAY

#define RTL8211F_CLKOUT_EN

#define RTL8201F_ISR
#define RTL8201F_ISR_ANERR
#define RTL8201F_ISR_DUPLEX
#define RTL8201F_ISR_LINK
#define RTL8201F_ISR_MASK
#define RTL8201F_IER

#define RTL822X_VND1_SERDES_OPTION
#define RTL822X_VND1_SERDES_OPTION_MODE_MASK
#define RTL822X_VND1_SERDES_OPTION_MODE_2500BASEX_SGMII
#define RTL822X_VND1_SERDES_OPTION_MODE_2500BASEX

#define RTL822X_VND1_SERDES_CTRL3
#define RTL822X_VND1_SERDES_CTRL3_MODE_MASK
#define RTL822X_VND1_SERDES_CTRL3_MODE_SGMII
#define RTL822X_VND1_SERDES_CTRL3_MODE_2500BASEX

/* RTL822X_VND2_XXXXX registers are only accessible when phydev->is_c45
 * is set, they cannot be accessed by C45-over-C22.
 */
#define RTL822X_VND2_GBCR

#define RTL822X_VND2_GANLPAR

#define RTL822X_VND2_PHYSR

#define RTL8366RB_POWER_SAVE
#define RTL8366RB_POWER_SAVE_ON

#define RTL9000A_GINMR
#define RTL9000A_GINMR_LINK_STATUS

#define RTLGEN_SPEED_MASK

#define RTL_GENERIC_PHYID
#define RTL_8211FVD_PHYID
#define RTL_8221B_VB_CG
#define RTL_8221B_VN_CG
#define RTL_8251B

#define RTL8211F_LED_COUNT

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

struct rtl821x_priv {};

static int rtl821x_read_page(struct phy_device *phydev)
{}

static int rtl821x_write_page(struct phy_device *phydev, int page)
{}

static int rtl821x_probe(struct phy_device *phydev)
{}

static int rtl8201_ack_interrupt(struct phy_device *phydev)
{}

static int rtl821x_ack_interrupt(struct phy_device *phydev)
{}

static int rtl8211f_ack_interrupt(struct phy_device *phydev)
{}

static int rtl8201_config_intr(struct phy_device *phydev)
{}

static int rtl8211b_config_intr(struct phy_device *phydev)
{}

static int rtl8211e_config_intr(struct phy_device *phydev)
{}

static int rtl8211f_config_intr(struct phy_device *phydev)
{}

static irqreturn_t rtl8201_handle_interrupt(struct phy_device *phydev)
{}

static irqreturn_t rtl821x_handle_interrupt(struct phy_device *phydev)
{}

static irqreturn_t rtl8211f_handle_interrupt(struct phy_device *phydev)
{}

static int rtl8211_config_aneg(struct phy_device *phydev)
{}

static int rtl8211c_config_init(struct phy_device *phydev)
{}

static int rtl8211f_config_init(struct phy_device *phydev)
{}

static int rtl821x_suspend(struct phy_device *phydev)
{}

static int rtl821x_resume(struct phy_device *phydev)
{}

static int rtl8211f_led_hw_is_supported(struct phy_device *phydev, u8 index,
					unsigned long rules)
{}

static int rtl8211f_led_hw_control_get(struct phy_device *phydev, u8 index,
				       unsigned long *rules)
{}

static int rtl8211f_led_hw_control_set(struct phy_device *phydev, u8 index,
				       unsigned long rules)
{}

static int rtl8211e_config_init(struct phy_device *phydev)
{}

static int rtl8211b_suspend(struct phy_device *phydev)
{}

static int rtl8211b_resume(struct phy_device *phydev)
{}

static int rtl8366rb_config_init(struct phy_device *phydev)
{}

/* get actual speed to cover the downshift case */
static void rtlgen_decode_speed(struct phy_device *phydev, int val)
{}

static int rtlgen_read_status(struct phy_device *phydev)
{}

static int rtlgen_read_mmd(struct phy_device *phydev, int devnum, u16 regnum)
{}

static int rtlgen_write_mmd(struct phy_device *phydev, int devnum, u16 regnum,
			    u16 val)
{}

static int rtl822x_read_mmd(struct phy_device *phydev, int devnum, u16 regnum)
{}

static int rtl822x_write_mmd(struct phy_device *phydev, int devnum, u16 regnum,
			     u16 val)
{}

static int rtl822xb_config_init(struct phy_device *phydev)
{}

static int rtl822xb_get_rate_matching(struct phy_device *phydev,
				      phy_interface_t iface)
{}

static int rtl822x_get_features(struct phy_device *phydev)
{}

static int rtl822x_config_aneg(struct phy_device *phydev)
{}

static void rtl822xb_update_interface(struct phy_device *phydev)
{}

static int rtl822x_read_status(struct phy_device *phydev)
{}

static int rtl822xb_read_status(struct phy_device *phydev)
{}

static int rtl822x_c45_get_features(struct phy_device *phydev)
{}

static int rtl822x_c45_config_aneg(struct phy_device *phydev)
{}

static int rtl822x_c45_read_status(struct phy_device *phydev)
{}

static int rtl822xb_c45_read_status(struct phy_device *phydev)
{}

static bool rtlgen_supports_2_5gbps(struct phy_device *phydev)
{}

static int rtlgen_match_phy_device(struct phy_device *phydev)
{}

static int rtl8226_match_phy_device(struct phy_device *phydev)
{}

static int rtlgen_is_c45_match(struct phy_device *phydev, unsigned int id,
			       bool is_c45)
{}

static int rtl8221b_vb_cg_c22_match_phy_device(struct phy_device *phydev)
{}

static int rtl8221b_vb_cg_c45_match_phy_device(struct phy_device *phydev)
{}

static int rtl8221b_vn_cg_c22_match_phy_device(struct phy_device *phydev)
{}

static int rtl8221b_vn_cg_c45_match_phy_device(struct phy_device *phydev)
{}

static int rtlgen_resume(struct phy_device *phydev)
{}

static int rtlgen_c45_resume(struct phy_device *phydev)
{}

static int rtl9000a_config_init(struct phy_device *phydev)
{}

static int rtl9000a_config_aneg(struct phy_device *phydev)
{}

static int rtl9000a_read_status(struct phy_device *phydev)
{}

static int rtl9000a_ack_interrupt(struct phy_device *phydev)
{}

static int rtl9000a_config_intr(struct phy_device *phydev)
{}

static irqreturn_t rtl9000a_handle_interrupt(struct phy_device *phydev)
{}

static struct phy_driver realtek_drvs[] =;

module_phy_driver(realtek_drvs);

static const struct mdio_device_id __maybe_unused realtek_tbl[] =;

MODULE_DEVICE_TABLE(mdio, realtek_tbl);