1 /*******************************************************************************
2   Copyright (C) 2007-2009  STMicroelectronics Ltd
3 
4   This program is free software; you can redistribute it and/or modify it
5   under the terms and conditions of the GNU General Public License,
6   version 2, as published by the Free Software Foundation.
7 
8   This program is distributed in the hope it will be useful, but WITHOUT
9   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
11   more details.
12 
13   The full GNU General Public License is included in this distribution in
14   the file called "COPYING".
15 
16   Author: Giuseppe Cavallaro <peppe.cavallaro@st.com>
17 *******************************************************************************/
18 
19 #ifndef __STMMAC_PLATFORM_H__
20 #define __STMMAC_PLATFORM_H__
21 
22 #include "stmmac.h"
23 
24 struct plat_stmmacenet_data *
25 stmmac_probe_config_dt(struct platform_device *pdev, const char **mac);
26 void stmmac_remove_config_dt(struct platform_device *pdev,
27 			     struct plat_stmmacenet_data *plat);
28 
29 int stmmac_get_platform_resources(struct platform_device *pdev,
30 				  struct stmmac_resources *stmmac_res);
31 
32 int stmmac_pltfr_remove(struct platform_device *pdev);
33 extern const struct dev_pm_ops stmmac_pltfr_pm_ops;
34 
35 static inline void *get_stmmac_bsp_priv(struct device *dev)
36 {
37 	struct net_device *ndev = dev_get_drvdata(dev);
38 	struct stmmac_priv *priv = netdev_priv(ndev);
39 
40 	return priv->plat->bsp_priv;
41 }
42 
43 #endif /* __STMMAC_PLATFORM_H__ */
44