#include <linux/gpio/consumer.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/mii.h>
#include <linux/of_mdio.h>
#include <linux/pm_runtime.h>
#include <linux/phy.h>
#include <linux/property.h>
#include <linux/slab.h>
#include "dwxgmac2.h"
#include "stmmac.h"
#define MII_BUSY …
#define MII_WRITE …
#define MII_DATA_MASK …
#define MII_GMAC4_GOC_SHIFT …
#define MII_GMAC4_REG_ADDR_SHIFT …
#define MII_GMAC4_WRITE …
#define MII_GMAC4_READ …
#define MII_GMAC4_C45E …
#define MII_XGMAC_SADDR …
#define MII_XGMAC_CMD_SHIFT …
#define MII_XGMAC_WRITE …
#define MII_XGMAC_READ …
#define MII_XGMAC_BUSY …
#define MII_XGMAC_MAX_C22ADDR …
#define MII_XGMAC_C22P_MASK …
#define MII_XGMAC_PA_SHIFT …
#define MII_XGMAC_DA_SHIFT …
static void stmmac_xgmac2_c45_format(struct stmmac_priv *priv, int phyaddr,
int devad, int phyreg, u32 *hw_addr)
{ … }
static void stmmac_xgmac2_c22_format(struct stmmac_priv *priv, int phyaddr,
int phyreg, u32 *hw_addr)
{ … }
static int stmmac_xgmac2_mdio_read(struct stmmac_priv *priv, u32 addr,
u32 value)
{ … }
static int stmmac_xgmac2_mdio_read_c22(struct mii_bus *bus, int phyaddr,
int phyreg)
{ … }
static int stmmac_xgmac2_mdio_read_c45(struct mii_bus *bus, int phyaddr,
int devad, int phyreg)
{ … }
static int stmmac_xgmac2_mdio_write(struct stmmac_priv *priv, u32 addr,
u32 value, u16 phydata)
{ … }
static int stmmac_xgmac2_mdio_write_c22(struct mii_bus *bus, int phyaddr,
int phyreg, u16 phydata)
{ … }
static int stmmac_xgmac2_mdio_write_c45(struct mii_bus *bus, int phyaddr,
int devad, int phyreg, u16 phydata)
{ … }
static int stmmac_mdio_read(struct stmmac_priv *priv, int data, u32 value)
{ … }
static int stmmac_mdio_read_c22(struct mii_bus *bus, int phyaddr, int phyreg)
{ … }
static int stmmac_mdio_read_c45(struct mii_bus *bus, int phyaddr, int devad,
int phyreg)
{ … }
static int stmmac_mdio_write(struct stmmac_priv *priv, int data, u32 value)
{ … }
static int stmmac_mdio_write_c22(struct mii_bus *bus, int phyaddr, int phyreg,
u16 phydata)
{ … }
static int stmmac_mdio_write_c45(struct mii_bus *bus, int phyaddr,
int devad, int phyreg, u16 phydata)
{ … }
int stmmac_mdio_reset(struct mii_bus *bus)
{ … }
int stmmac_pcs_setup(struct net_device *ndev)
{ … }
void stmmac_pcs_clean(struct net_device *ndev)
{ … }
int stmmac_mdio_register(struct net_device *ndev)
{ … }
int stmmac_mdio_unregister(struct net_device *ndev)
{ … }