/* Force autonegotiation. 
Force the autonegotiation and set link speed and duplex mode of the link */
void phy_autoneg_force(uint8_t phy, enum phy_status mode)
/* Force autonegotiation. 
Force the autonegotiation and set link speed and duplex mode of the link */
void phy_autoneg_force(uint8_t phy, enum phy_status mode)
{
	uint16_t bst = 0;
	if ((mode == LINK_FD_10M) || (mode == LINK_FD_100M) ||
	    (mode == LINK_FD_1000M) || (mode == LINK_FD_10000M)) {
		bst |= PHY_REG_BCR_FD;
	}
	if ((mode == LINK_FD_100M) || (mode == LINK_HD_100M)) {
		bst |= PHY_REG_BCR_100M;
	}
	eth_smi_bit_op(phy, PHY_REG_BCR, bst,
		    ~(PHY_REG_BCR_AN | PHY_REG_BCR_100M | PHY_REG_BCR_FD));
}