#include <linux/mfd/altera-sysmgr.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_net.h>
#include <linux/phy.h>
#include <linux/regmap.h>
#include <linux/mdio/mdio-regmap.h>
#include <linux/pcs-lynx.h>
#include <linux/reset.h>
#include <linux/stmmac.h>
#include "stmmac.h"
#include "stmmac_platform.h"
#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_GMII_MII …
#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RGMII …
#define SYSMGR_EMACGRP_CTRL_PHYSEL_ENUM_RMII …
#define SYSMGR_EMACGRP_CTRL_PHYSEL_WIDTH …
#define SYSMGR_EMACGRP_CTRL_PHYSEL_MASK …
#define SYSMGR_EMACGRP_CTRL_PTP_REF_CLK_MASK …
#define SYSMGR_GEN10_EMACGRP_CTRL_PTP_REF_CLK_MASK …
#define SYSMGR_FPGAGRP_MODULE_REG …
#define SYSMGR_FPGAGRP_MODULE_EMAC …
#define SYSMGR_FPGAINTF_EMAC_REG …
#define SYSMGR_FPGAINTF_EMAC_BIT …
#define EMAC_SPLITTER_CTRL_REG …
#define EMAC_SPLITTER_CTRL_SPEED_MASK …
#define EMAC_SPLITTER_CTRL_SPEED_10 …
#define EMAC_SPLITTER_CTRL_SPEED_100 …
#define EMAC_SPLITTER_CTRL_SPEED_1000 …
#define SGMII_ADAPTER_CTRL_REG …
#define SGMII_ADAPTER_ENABLE …
#define SGMII_ADAPTER_DISABLE …
struct socfpga_dwmac;
struct socfpga_dwmac_ops { … };
struct socfpga_dwmac { … };
static void socfpga_dwmac_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode)
{ … }
static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *dev)
{ … }
static int socfpga_get_plat_phymode(struct socfpga_dwmac *dwmac)
{ … }
static void socfpga_sgmii_config(struct socfpga_dwmac *dwmac, bool enable)
{ … }
static int socfpga_set_phy_mode_common(int phymode, u32 *val)
{ … }
static int socfpga_gen5_set_phy_mode(struct socfpga_dwmac *dwmac)
{ … }
static int socfpga_gen10_set_phy_mode(struct socfpga_dwmac *dwmac)
{ … }
static int socfpga_dwmac_pcs_init(struct stmmac_priv *priv)
{ … }
static void socfpga_dwmac_pcs_exit(struct stmmac_priv *priv)
{ … }
static struct phylink_pcs *socfpga_dwmac_select_pcs(struct stmmac_priv *priv,
phy_interface_t interface)
{ … }
static int socfpga_dwmac_probe(struct platform_device *pdev)
{ … }
#ifdef CONFIG_PM_SLEEP
static int socfpga_dwmac_resume(struct device *dev)
{ … }
#endif
static int __maybe_unused socfpga_dwmac_runtime_suspend(struct device *dev)
{ … }
static int __maybe_unused socfpga_dwmac_runtime_resume(struct device *dev)
{ … }
static const struct dev_pm_ops socfpga_dwmac_pm_ops = …;
static const struct socfpga_dwmac_ops socfpga_gen5_ops = …;
static const struct socfpga_dwmac_ops socfpga_gen10_ops = …;
static const struct of_device_id socfpga_dwmac_match[] = …;
MODULE_DEVICE_TABLE(of, socfpga_dwmac_match);
static struct platform_driver socfpga_dwmac_driver = …;
module_platform_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;