diff options
Diffstat (limited to 'drivers/net/stmmac/stmmac.h')
-rw-r--r-- | drivers/net/stmmac/stmmac.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/net/stmmac/stmmac.h b/drivers/net/stmmac/stmmac.h index 6d2eae3040e5..0d5529fa579a 100644 --- a/drivers/net/stmmac/stmmac.h +++ b/drivers/net/stmmac/stmmac.h | |||
@@ -21,6 +21,7 @@ | |||
21 | *******************************************************************************/ | 21 | *******************************************************************************/ |
22 | 22 | ||
23 | #define DRV_MODULE_VERSION "Oct_09" | 23 | #define DRV_MODULE_VERSION "Oct_09" |
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 |
@@ -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); |