| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
/******************************************************************************* |
| 3 |
Copyright (C) 2007-2009 STMicroelectronics Ltd |
| 4 |
|
| 5 |
|
| 6 |
Author: Giuseppe Cavallaro <[email protected]> |
| 7 |
*******************************************************************************/ |
| 8 |
|
| 9 |
#ifndef __STMMAC_PLATFORM_H__ |
| 10 |
#define __STMMAC_PLATFORM_H__ |
| 11 |
|
| 12 |
#include "stmmac.h" |
| 13 |
|
| 14 |
struct plat_stmmacenet_data * |
| 15 |
devm_stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac); |
| 16 |
|
| 17 |
struct clk *stmmac_pltfr_find_clk(struct plat_stmmacenet_data *plat_dat, |
| 18 |
const char *name); |
| 19 |
|
| 20 |
int stmmac_get_platform_resources(struct platform_device *pdev, |
| 21 |
struct stmmac_resources *stmmac_res); |
| 22 |
|
| 23 |
int stmmac_pltfr_probe(struct platform_device *pdev, |
| 24 |
struct plat_stmmacenet_data *plat, |
| 25 |
struct stmmac_resources *res); |
| 26 |
int devm_stmmac_pltfr_probe(struct platform_device *pdev, |
| 27 |
struct plat_stmmacenet_data *plat, |
| 28 |
struct stmmac_resources *res); |
| 29 |
void stmmac_pltfr_remove(struct platform_device *pdev); |
| 30 |
extern const struct dev_pm_ops stmmac_pltfr_pm_ops; |
| 31 |
|
| 32 |
static inline void *get_stmmac_bsp_priv(struct device *dev) |
| 33 |
{ |
| 34 |
struct net_device *ndev = dev_get_drvdata(dev); |
| 35 |
struct stmmac_priv *priv = netdev_priv(ndev); |
| 36 |
|
| 37 |
return priv->plat->bsp_priv; |
| 38 |
} |
| 39 |
|
| 40 |
#endif /* __STMMAC_PLATFORM_H__ */ |