/* We have to reset the PHY immediately before doing a software SoC reset, because otherwise the Ethernet block of the SoC will hang after reset.  */
void lpc178x_phy_final_reset(void)
/* We have to reset the PHY immediately before doing a software SoC reset, because otherwise the Ethernet block of the SoC will hang after reset.  */
void lpc178x_phy_final_reset(void)
{
	lpc178x_periph_enable(LPC178X_SCC_PCONP_PCENET_MSK, 1);
	__lpc_mii_mngt_reset(lpc178x_pldat);
	writel(0, LPC_ENET_MAC1(lpc178x_pldat->net_base));
	writel(0, LPC_ENET_MAC2(lpc178x_pldat->net_base));
	phy_write(lpc178x_pldat->phy_dev, MII_BMCR, BMCR_RESET);
	lpc178x_periph_enable(LPC178X_SCC_PCONP_PCENET_MSK, 0);
}