Merge "ipq806x: Add MII RESET and AUTONEG for all phy devices"

This commit is contained in:
Linux Build Service Account 2019-06-13 06:06:31 -07:00 committed by Gerrit - the friendly Code Review server
commit c257237fc5
2 changed files with 4 additions and 0 deletions

View file

@ -357,6 +357,8 @@
#define FORCE_RATE_10 (0 << 13) | (1 << 15) | (1 << 8)
#define FORCE_RATE_100 (1 << 13) | (1 << 15) | (1 << 8)
#define BMCR_RESET 0x8000
typedef struct
{
volatile u32 status; /* Status */

View file

@ -867,6 +867,8 @@ int ipq_gmac_init(ipq_gmac_board_cfg_t *gmac_cfg)
strncpy(bb_miiphy_buses[i].name, gmac_cfg->phy_name,
sizeof(bb_miiphy_buses[i].name));
miiphy_register(bb_miiphy_buses[i].name, bb_miiphy_read, bb_miiphy_write);
miiphy_write(bb_miiphy_buses[i].name, ipq_gmac_macs[i]->phy_address,
PHY_CONTROL_REG, BMCR_RESET | AUTO_NEG_ENABLE);
}
eth_register(dev[i]);