]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/net/stmmac/stmmac.h
stmmac: convert to dev_pm_ops.
[net-next-2.6.git] / drivers / net / stmmac / stmmac.h
index ebebc644b1b8cf7b503fb07ef137cdf323d70a2c..eb258e2319e13592f1bf7658314ee90600a9d61d 100644 (file)
@@ -21,6 +21,7 @@
 *******************************************************************************/
 
 #define DRV_MODULE_VERSION     "Apr_2010"
+#include <linux/platform_device.h>
 #include <linux/stmmac.h>
 
 #include "common.h"
@@ -36,7 +37,6 @@ struct stmmac_priv {
        unsigned int cur_tx;
        unsigned int dirty_tx;
        unsigned int dma_tx_size;
-       int tx_coe;
        int tx_coalesce;
 
        struct dma_desc *dma_rx ;
@@ -47,26 +47,22 @@ struct stmmac_priv {
        struct sk_buff_head rx_recycle;
 
        struct net_device *dev;
-       int is_gmac;
        dma_addr_t dma_rx_phy;
        unsigned int dma_rx_size;
-       int rx_csum;
        unsigned int dma_buf_sz;
        struct device *device;
        struct mac_device_info *hw;
+       void __iomem *ioaddr;
 
        struct stmmac_extra_stats xstats;
        struct napi_struct napi;
 
        phy_interface_t phy_interface;
-       int pbl;
-       int bus_id;
        int phy_addr;
        int phy_mask;
        int (*phy_reset) (void *priv);
-       void (*fix_mac_speed) (void *priv, unsigned int speed);
-       void (*bus_setup)(unsigned long ioaddr);
-       void *bsp_priv;
+       int rx_coe;
+       int no_csum_insertion;
 
        int phy_irq;
        struct phy_device *phydev;
@@ -81,40 +77,17 @@ struct stmmac_priv {
        spinlock_t lock;
        int wolopts;
        int wolenabled;
-       int shutdown;
 #ifdef CONFIG_STMMAC_TIMER
        struct stmmac_timer *tm;
 #endif
 #ifdef STMMAC_VLAN_TAG_USED
        struct vlan_group *vlgrp;
 #endif
-       int enh_desc;
+       struct plat_stmmacenet_data *plat;
 };
 
-#ifdef CONFIG_STM_DRIVERS
-#include <linux/stm/pad.h>
-static inline int stmmac_claim_resource(struct platform_device *pdev)
-{
-       int ret = 0;
-       struct plat_stmmacenet_data *plat_dat = pdev->dev.platform_data;
-
-       /* Pad routing setup */
-       if (IS_ERR(devm_stm_pad_claim(&pdev->dev, plat_dat->pad_config,
-                       dev_name(&pdev->dev)))) {
-               printk(KERN_ERR "%s: Failed to request pads!\n", __func__);
-               ret = -ENODEV;
-       }
-       return ret;
-}
-#else
-static inline int stmmac_claim_resource(struct platform_device *pdev)
-{
-       return 0;
-}
-#endif
-
 extern int stmmac_mdio_unregister(struct net_device *ndev);
 extern int stmmac_mdio_register(struct net_device *ndev);
 extern void stmmac_set_ethtool_ops(struct net_device *netdev);
-extern struct stmmac_desc_ops enh_desc_ops;
-extern struct stmmac_desc_ops ndesc_ops;
+extern const struct stmmac_desc_ops enh_desc_ops;
+extern const struct stmmac_desc_ops ndesc_ops;