/* Writes a register to the MII Management serial interface  */
static void smc_phy_write(struct net_device *dev, int phyaddr, int phyreg, int phydata)
/* Writes a register to the MII Management serial interface  */
static void smc_phy_write(struct net_device *dev, int phyaddr, int phyreg, int phydata)
{
	struct smc_local *lp = netdev_priv(dev);
	void __iomem *ioaddr = lp->base;
	SMC_SELECT_BANK(lp, 3);
	smc_mii_out(dev, 0xffffffff, 32);
	smc_mii_out(dev, 5 << 28 | phyaddr << 23 | phyreg << 18 | 2 << 16 | phydata, 32);
	SMC_SET_MII(lp, SMC_GET_MII(lp) & ~(MII_MCLK|MII_MDOE|MII_MDO));
	DBG(3, "%s: phyaddr=0x%x, phyreg=0x%x, phydata=0x%x\n",
		__func__, phyaddr, phyreg, phydata);
	SMC_SELECT_BANK(lp, 2);
}