/* Write value to the a PHY register Note: MDI interface is assumed to already have been enabled.  */
static void write_phy(unsigned char phy_addr, unsigned char address, unsigned int value)
/* Write value to the a PHY register Note: MDI interface is assumed to already have been enabled.  */
static void write_phy(unsigned char phy_addr, unsigned char address, unsigned int value)
{
	at91_emac_write(AT91_EMAC_MAN, AT91_EMAC_MAN_802_3 | AT91_EMAC_RW_W
		| ((phy_addr & 0x1f) << 23) | (address << 18) | (value & AT91_EMAC_DATA));
	at91_phy_wait();
}