summaryrefslogtreecommitdiff
path: root/target/linux
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2009-10-30 12:26:17 +0000
committerGabor Juhos <juhosg@openwrt.org>2009-10-30 12:26:17 +0000
commitf336f8748c1b0a8b494a4e524ed6cbcf01e62185 (patch)
tree2d296bacdbe6ec92d4bc57595b76144ad22d02b0 /target/linux
parentaeb60acd26e5bbc94190ce740c4a614b608afaa2 (diff)
downloadmtk-20170518-f336f8748c1b0a8b494a4e524ed6cbcf01e62185.zip
mtk-20170518-f336f8748c1b0a8b494a4e524ed6cbcf01e62185.tar.gz
mtk-20170518-f336f8748c1b0a8b494a4e524ed6cbcf01e62185.tar.bz2
ar71xx: update mdio_reset code
SVN-Revision: 18224
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_mdio.c7
1 files changed, 5 insertions, 2 deletions
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 72f732d..d3cbace 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;