/* 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)
{
    unsigned short mii_txdata;
    mii_txdata = value;
    sep_emac_write(MAC_MII_ADDRESS,(unsigned long)(address<<8) | phy_addr);
    sep_emac_write(MAC_MII_TXDATA ,mii_txdata);
    sep_emac_write(MAC_MII_CMD ,0x4);
    udelay(40);
    sep_phy_wait();
    return;
}