This enables us to add fixups to the board specific code for boards that
require special treatment of PHYs on mdio bus reset.

Signed-off-by: Felix Kaechele <[email protected]>
---
 .../ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h    | 1 +
 .../ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c     | 3 +++
 2 files changed, 4 insertions(+)

diff --git 
a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h 
b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
index 656a6ef..694ca28 100644
--- 
a/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
+++ 
b/target/linux/ar71xx/files/arch/mips/include/asm/mach-ath79/ag71xx_platform.h
@@ -55,6 +55,7 @@ struct ag71xx_mdio_platform_data {
        u8              is_ar934x:1;
        unsigned long   mdio_clock;
        unsigned long   ref_clock;
+       void    (*reset)(struct mii_bus *bus);
 };
 
 #endif /* __ASM_MACH_ATH79_PLATFORM_H */
diff --git 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c
index ec88233..71ae825 100644
--- 
a/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c
+++ 
b/target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_mdio.c
@@ -181,6 +181,9 @@ static int ag71xx_mdio_reset(struct mii_bus *bus)
        ag71xx_mdio_wr(am, AG71XX_REG_MII_CFG, t);
        udelay(100);
 
+       if (am->pdata->reset)
+               am->pdata->reset(bus);
+
        return 0;
 }
 
-- 
1.8.4.2
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to