diff options
author | Chuanhong Guo <gch981213@gmail.com> | 2018-07-17 17:09:13 +0800 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2018-07-30 10:43:33 +0200 |
commit | 83d2dbc59924c90dd865de113a55d60826ac0c04 (patch) | |
tree | 2fb028041fcffa2e1de5342fa6f9a98462da5e48 /target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h | |
parent | 24cbe27bb7ff83b9bb3a2640904bced1a2d14a8d (diff) | |
download | upstream-83d2dbc59924c90dd865de113a55d60826ac0c04.tar.gz upstream-83d2dbc59924c90dd865de113a55d60826ac0c04.tar.bz2 upstream-83d2dbc59924c90dd865de113a55d60826ac0c04.zip |
ath79: ag71xx: Split mdio driver into an independent platform device.
We need to have mdio1 belonging to gmac1 initialized before gmac0.
Split it into a separated mdio device to get both mdios ready before probing gmac.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h')
-rw-r--r-- | target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx.h | 14 |
1 files changed, 6 insertions, 8 deletions
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 d154bbec9e..70c8582294 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 @@ -170,12 +170,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; @@ -189,7 +187,6 @@ struct ag71xx { struct reset_control *mac_reset; struct reset_control *phy_reset; - struct reset_control *mdio_reset; u32 fifodata[3]; u32 plldata[3]; @@ -201,6 +198,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); @@ -441,11 +444,6 @@ 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); -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); |