diff options
| -rw-r--r-- | drivers/net/phy/micrel.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index ddd6b6374d8c..3c8186f269f9 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | 28 | ||
| 29 | /* Operation Mode Strap Override */ | 29 | /* Operation Mode Strap Override */ |
| 30 | #define MII_KSZPHY_OMSO 0x16 | 30 | #define MII_KSZPHY_OMSO 0x16 |
| 31 | #define KSZPHY_OMSO_FACTORY_TEST BIT(15) | ||
| 31 | #define KSZPHY_OMSO_B_CAST_OFF BIT(9) | 32 | #define KSZPHY_OMSO_B_CAST_OFF BIT(9) |
| 32 | #define KSZPHY_OMSO_NAND_TREE_ON BIT(5) | 33 | #define KSZPHY_OMSO_NAND_TREE_ON BIT(5) |
| 33 | #define KSZPHY_OMSO_RMII_OVERRIDE BIT(1) | 34 | #define KSZPHY_OMSO_RMII_OVERRIDE BIT(1) |
| @@ -340,6 +341,18 @@ static int ksz8041_config_aneg(struct phy_device *phydev) | |||
| 340 | return genphy_config_aneg(phydev); | 341 | return genphy_config_aneg(phydev); |
| 341 | } | 342 | } |
| 342 | 343 | ||
| 344 | static int ksz8081_config_init(struct phy_device *phydev) | ||
| 345 | { | ||
| 346 | /* KSZPHY_OMSO_FACTORY_TEST is set at de-assertion of the reset line | ||
| 347 | * based on the RXER (KSZ8081RNA/RND) or TXC (KSZ8081MNX/RNB) pin. If a | ||
| 348 | * pull-down is missing, the factory test mode should be cleared by | ||
| 349 | * manually writing a 0. | ||
| 350 | */ | ||
| 351 | phy_clear_bits(phydev, MII_KSZPHY_OMSO, KSZPHY_OMSO_FACTORY_TEST); | ||
| 352 | |||
| 353 | return kszphy_config_init(phydev); | ||
| 354 | } | ||
| 355 | |||
| 343 | static int ksz8061_config_init(struct phy_device *phydev) | 356 | static int ksz8061_config_init(struct phy_device *phydev) |
| 344 | { | 357 | { |
| 345 | int ret; | 358 | int ret; |
| @@ -1038,7 +1051,7 @@ static struct phy_driver ksphy_driver[] = { | |||
| 1038 | /* PHY_BASIC_FEATURES */ | 1051 | /* PHY_BASIC_FEATURES */ |
| 1039 | .driver_data = &ksz8081_type, | 1052 | .driver_data = &ksz8081_type, |
| 1040 | .probe = kszphy_probe, | 1053 | .probe = kszphy_probe, |
| 1041 | .config_init = kszphy_config_init, | 1054 | .config_init = ksz8081_config_init, |
| 1042 | .ack_interrupt = kszphy_ack_interrupt, | 1055 | .ack_interrupt = kszphy_ack_interrupt, |
| 1043 | .config_intr = kszphy_config_intr, | 1056 | .config_intr = kszphy_config_intr, |
| 1044 | .get_sset_count = kszphy_get_sset_count, | 1057 | .get_sset_count = kszphy_get_sset_count, |
