X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fstaging%2Fwigyori.git;a=blobdiff_plain;f=target%2Flinux%2Fath79%2Ffiles%2Fdrivers%2Fnet%2Fethernet%2Fatheros%2Fag71xx%2Fag71xx.h;h=fde9db37456d5ce261ff3d4414f3e1dc69f40be0;hp=22b22522a3f6985b114ec155f7212c51d45e98cf;hb=cea3e9e4383688f00ce5ef76c2b694aeead4c0ac;hpb=53c474abbdfef8eb3499e2d10c9ad491788b8a72 diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h index 22b22522a3..fde9db3745 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h @@ -154,6 +154,8 @@ struct ag71xx { struct ag71xx_ring rx_ring ____cacheline_aligned; struct ag71xx_ring tx_ring ____cacheline_aligned; + int mac_idx; + u16 desc_pktlen_mask; u16 rx_buf_size; u8 rx_buf_offset; @@ -170,12 +172,10 @@ struct ag71xx { */ void __iomem *mac_base; void __iomem *mii_base; - struct regmap *mii_regmap; struct ag71xx_desc *stop_desc; dma_addr_t stop_desc_dma; - struct mii_bus *mii_bus; struct phy_device *phy_dev; void *phy_priv; int phy_if_mode; @@ -188,7 +188,6 @@ struct ag71xx { struct timer_list oom_timer; struct reset_control *mac_reset; - struct reset_control *phy_reset; struct reset_control *mdio_reset; u32 fifodata[3]; @@ -201,6 +200,12 @@ struct ag71xx { #endif }; +struct ag71xx_mdio { + struct reset_control *mdio_reset; + struct mii_bus *mii_bus; + struct regmap *mii_regmap; +}; + extern struct ethtool_ops ag71xx_ethtool_ops; void ag71xx_link_adjust(struct ag71xx *ag); @@ -440,12 +445,8 @@ static inline void ag71xx_debugfs_update_napi_stats(struct ag71xx *ag, int ag71xx_ar7240_init(struct ag71xx *ag, struct device_node *np); void ag71xx_ar7240_cleanup(struct ag71xx *ag); -void ag71xx_ar7240_start(struct ag71xx *ag); -int ag71xx_mdio_init(struct ag71xx *ag); -void ag71xx_mdio_cleanup(struct ag71xx *ag); -int ag71xx_mdio_mii_read(struct mii_bus *bus, int addr, int reg); -int ag71xx_mdio_mii_write(struct mii_bus *bus, int addr, int reg, u16 val); +int ag71xx_setup_gmac(struct device_node *np); int ar7240sw_phy_read(struct mii_bus *mii, int addr, int reg); int ar7240sw_phy_write(struct mii_bus *mii, int addr, int reg, u16 val);