1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*******************************************************************************
3 Copyright (C) 2007-2009 STMicroelectronics Ltd
6 Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
7 *******************************************************************************/
9 #ifndef __STMMAC_PLATFORM_H__
10 #define __STMMAC_PLATFORM_H__
14 struct plat_stmmacenet_data *
15 stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac);
16 struct plat_stmmacenet_data *
17 devm_stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac);
18 void stmmac_remove_config_dt(struct platform_device *pdev,
19 struct plat_stmmacenet_data *plat);
21 int stmmac_get_platform_resources(struct platform_device *pdev,
22 struct stmmac_resources *stmmac_res);
24 int stmmac_pltfr_init(struct platform_device *pdev,
25 struct plat_stmmacenet_data *plat);
26 void stmmac_pltfr_exit(struct platform_device *pdev,
27 struct plat_stmmacenet_data *plat);
29 int stmmac_pltfr_probe(struct platform_device *pdev,
30 struct plat_stmmacenet_data *plat,
31 struct stmmac_resources *res);
32 int devm_stmmac_pltfr_probe(struct platform_device *pdev,
33 struct plat_stmmacenet_data *plat,
34 struct stmmac_resources *res);
35 void stmmac_pltfr_remove_no_dt(struct platform_device *pdev);
36 void stmmac_pltfr_remove(struct platform_device *pdev);
37 extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
39 static inline void *get_stmmac_bsp_priv(struct device *dev)
41 struct net_device *ndev = dev_get_drvdata(dev);
42 struct stmmac_priv *priv = netdev_priv(ndev);
44 return priv->plat->bsp_priv;
47 #endif /* __STMMAC_PLATFORM_H__ */