net: phy: micrel: Do not overwrite reserved bits
ksz8021_config_init() unconditionally sets the KSZPHY_OMSO_RMII_OVERRIDE bit. This is since the initial micrel phy commit, so it's not reproducible where this comes from and why this is done. Neither U-Boot nor the kernel ever touch this bit and so should we. Also, instead of doing a write only operation, read/modify/write the bit we actually want to change. This fixes operation on a KSZ8081MLX which is a MII only phy. KSZPHY_OMSO_RMII_OVERRIDE is reserved here and must be written to 0. KSZPHY_OMSO_MII_OVERRIDE is default 1 and must be written as 1. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
7649dc9ec9
commit
9549b10a7e
|
@ -72,8 +72,12 @@ static int kszphy_config_init(struct phy_device *phydev)
|
|||
|
||||
static int ksz8021_config_init(struct phy_device *phydev)
|
||||
{
|
||||
const u16 val = KSZPHY_OMSO_B_CAST_OFF | KSZPHY_OMSO_RMII_OVERRIDE;
|
||||
u16 val;
|
||||
|
||||
val = phy_read(phydev, MII_KSZPHY_OMSO);
|
||||
val |= KSZPHY_OMSO_B_CAST_OFF;
|
||||
phy_write(phydev, MII_KSZPHY_OMSO, val);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue