ath79: ag71xx: fix speed applied to MII0/1_CTRL on ar71xx/ar913x

Currently speed value is applied to interface mode field.

Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
This commit is contained in:
Chuanhong Guo 2018-08-12 12:57:52 +08:00 committed by Mathias Kresin
parent 4dc7cb792a
commit 42b3fdf981

View File

@ -552,8 +552,8 @@ static void ath79_mii_ctrl_set_speed(struct ag71xx *ag)
}
t = __raw_readl(ag->mii_base);
t &= ~(AR71XX_MII_CTRL_IF_MASK);
t |= (mii_speed & AR71XX_MII_CTRL_IF_MASK);
t &= ~(AR71XX_MII_CTRL_SPEED_MASK << AR71XX_MII_CTRL_SPEED_SHIFT);
t |= mii_speed << AR71XX_MII_CTRL_SPEED_SHIFT;
__raw_writel(t, ag->mii_base);
}