From: Gabor Juhos Date: Fri, 30 Oct 2009 12:26:17 +0000 (+0000) Subject: ar71xx: update mdio_reset code X-Git-Tag: reboot~22017 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f336f8748c1b0a8b494a4e524ed6cbcf01e62185;p=oweals%2Fopenwrt.git ar71xx: update mdio_reset code SVN-Revision: 18224 --- diff --git a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c index 72f732d54f..d3cbacedb2 100644 --- a/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c +++ b/target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c @@ -104,11 +104,14 @@ static void ag71xx_mdio_mii_write(struct ag71xx_mdio *am, static int ag71xx_mdio_reset(struct mii_bus *bus) { struct ag71xx_mdio *am = bus->priv; + u32 t; - ag71xx_mdio_wr(am, AG71XX_REG_MII_CFG, MII_CFG_RESET); + t = MII_CFG_CLK_DIV_28; + + ag71xx_mdio_wr(am, AG71XX_REG_MII_CFG, t | MII_CFG_RESET); udelay(100); - ag71xx_mdio_wr(am, AG71XX_REG_MII_CFG, MII_CFG_CLK_DIV_28); + ag71xx_mdio_wr(am, AG71XX_REG_MII_CFG, t); udelay(100); return 0;