diff options
Diffstat (limited to 'drivers/net/stmmac/stmmac.h')
-rw-r--r-- | drivers/net/stmmac/stmmac.h | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/drivers/net/stmmac/stmmac.h b/drivers/net/stmmac/stmmac.h index 6d2eae3040e5..ba35e6943cf4 100644 --- a/drivers/net/stmmac/stmmac.h +++ b/drivers/net/stmmac/stmmac.h | |||
@@ -20,7 +20,8 @@ | |||
20 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> | 20 | Author: Giuseppe Cavallaro <peppe.cavallaro@st.com> |
21 | *******************************************************************************/ | 21 | *******************************************************************************/ |
22 | 22 | ||
23 | #define DRV_MODULE_VERSION "Oct_09" | 23 | #define DRV_MODULE_VERSION "Jan_2010" |
24 | #include <linux/stmmac.h> | ||
24 | 25 | ||
25 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | 26 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) |
26 | #define STMMAC_VLAN_TAG_USED | 27 | #define STMMAC_VLAN_TAG_USED |
@@ -57,7 +58,7 @@ struct stmmac_priv { | |||
57 | int rx_csum; | 58 | int rx_csum; |
58 | unsigned int dma_buf_sz; | 59 | unsigned int dma_buf_sz; |
59 | struct device *device; | 60 | struct device *device; |
60 | struct mac_device_info *mac_type; | 61 | struct mac_device_info *hw; |
61 | 62 | ||
62 | struct stmmac_extra_stats xstats; | 63 | struct stmmac_extra_stats xstats; |
63 | struct napi_struct napi; | 64 | struct napi_struct napi; |
@@ -69,6 +70,7 @@ struct stmmac_priv { | |||
69 | int phy_mask; | 70 | int phy_mask; |
70 | int (*phy_reset) (void *priv); | 71 | int (*phy_reset) (void *priv); |
71 | void (*fix_mac_speed) (void *priv, unsigned int speed); | 72 | void (*fix_mac_speed) (void *priv, unsigned int speed); |
73 | void (*bus_setup)(unsigned long ioaddr); | ||
72 | void *bsp_priv; | 74 | void *bsp_priv; |
73 | 75 | ||
74 | int phy_irq; | 76 | int phy_irq; |
@@ -93,6 +95,28 @@ struct stmmac_priv { | |||
93 | #endif | 95 | #endif |
94 | }; | 96 | }; |
95 | 97 | ||
98 | #ifdef CONFIG_STM_DRIVERS | ||
99 | #include <linux/stm/pad.h> | ||
100 | static inline int stmmac_claim_resource(struct platform_device *pdev) | ||
101 | { | ||
102 | int ret = 0; | ||
103 | struct plat_stmmacenet_data *plat_dat = pdev->dev.platform_data; | ||
104 | |||
105 | /* Pad routing setup */ | ||
106 | if (IS_ERR(devm_stm_pad_claim(&pdev->dev, plat_dat->pad_config, | ||
107 | dev_name(&pdev->dev)))) { | ||
108 | printk(KERN_ERR "%s: Failed to request pads!\n", __func__); | ||
109 | ret = -ENODEV; | ||
110 | } | ||
111 | return ret; | ||
112 | } | ||
113 | #else | ||
114 | static inline int stmmac_claim_resource(struct platform_device *pdev) | ||
115 | { | ||
116 | return 0; | ||
117 | } | ||
118 | #endif | ||
119 | |||
96 | extern int stmmac_mdio_unregister(struct net_device *ndev); | 120 | extern int stmmac_mdio_unregister(struct net_device *ndev); |
97 | extern int stmmac_mdio_register(struct net_device *ndev); | 121 | extern int stmmac_mdio_register(struct net_device *ndev); |
98 | extern void stmmac_set_ethtool_ops(struct net_device *netdev); | 122 | extern void stmmac_set_ethtool_ops(struct net_device *netdev); |