#include <linux/clk.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_net.h>
#include <linux/phy.h>
#include <linux/platform_device.h>
#include <linux/pm_wakeirq.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#include <linux/stmmac.h>
#include "stmmac_platform.h"
#define SYSCFG_MCU_ETH_MASK …
#define SYSCFG_MP1_ETH_MASK …
#define SYSCFG_PMCCLRR_OFFSET …
#define SYSCFG_PMCR_ETH_CLK_SEL …
#define SYSCFG_PMCR_ETH_REF_CLK_SEL …
#define ETH_CK_F_25M …
#define ETH_CK_F_50M …
#define ETH_CK_F_125M …
#define SYSCFG_PMCR_ETH_SEL_MII …
#define SYSCFG_PMCR_ETH_SEL_RGMII …
#define SYSCFG_PMCR_ETH_SEL_RMII …
#define SYSCFG_PMCR_ETH_SEL_GMII …
#define SYSCFG_MCU_ETH_SEL_MII …
#define SYSCFG_MCU_ETH_SEL_RMII …
#define SYSCFG_MP2_ETH_MASK …
#define SYSCFG_ETHCR_ETH_PTP_CLK_SEL …
#define SYSCFG_ETHCR_ETH_CLK_SEL …
#define SYSCFG_ETHCR_ETH_REF_CLK_SEL …
#define SYSCFG_ETHCR_ETH_SEL_MII …
#define SYSCFG_ETHCR_ETH_SEL_RGMII …
#define SYSCFG_ETHCR_ETH_SEL_RMII …
struct stm32_dwmac { … };
struct stm32_ops { … };
static int stm32_dwmac_clk_enable(struct stm32_dwmac *dwmac, bool resume)
{ … }
static int stm32_dwmac_init(struct plat_stmmacenet_data *plat_dat, bool resume)
{ … }
static int stm32mp1_select_ethck_external(struct plat_stmmacenet_data *plat_dat)
{ … }
static int stm32mp1_validate_ethck_rate(struct plat_stmmacenet_data *plat_dat)
{ … }
static int stm32mp1_configure_pmcr(struct plat_stmmacenet_data *plat_dat)
{ … }
static int stm32mp2_configure_syscfg(struct plat_stmmacenet_data *plat_dat)
{ … }
static int stm32mp1_set_mode(struct plat_stmmacenet_data *plat_dat)
{ … }
static int stm32mcu_set_mode(struct plat_stmmacenet_data *plat_dat)
{ … }
static void stm32_dwmac_clk_disable(struct stm32_dwmac *dwmac, bool suspend)
{ … }
static int stm32_dwmac_parse_data(struct stm32_dwmac *dwmac,
struct device *dev)
{ … }
static int stm32mp1_parse_data(struct stm32_dwmac *dwmac,
struct device *dev)
{ … }
static int stm32_dwmac_probe(struct platform_device *pdev)
{ … }
static void stm32_dwmac_remove(struct platform_device *pdev)
{ … }
static int stm32mp1_suspend(struct stm32_dwmac *dwmac)
{ … }
static void stm32mp1_resume(struct stm32_dwmac *dwmac)
{ … }
#ifdef CONFIG_PM_SLEEP
static int stm32_dwmac_suspend(struct device *dev)
{ … }
static int stm32_dwmac_resume(struct device *dev)
{ … }
#endif
static SIMPLE_DEV_PM_OPS(stm32_dwmac_pm_ops,
stm32_dwmac_suspend, stm32_dwmac_resume);
static struct stm32_ops stm32mcu_dwmac_data = …;
static struct stm32_ops stm32mp1_dwmac_data = …;
static struct stm32_ops stm32mp13_dwmac_data = …;
static struct stm32_ops stm32mp25_dwmac_data = …;
static const struct of_device_id stm32_dwmac_match[] = …;
MODULE_DEVICE_TABLE(of, stm32_dwmac_match);
static struct platform_driver stm32_dwmac_driver = …;
module_platform_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;