/* write_eeprom_reg - write specified value into specified register in EEPROM  */
static int write_eeprom_reg(struct eth_device *dev, u8 value, u8 reg)
/* write_eeprom_reg - write specified value into specified register in EEPROM  */
static int write_eeprom_reg(struct eth_device *dev, u8 value, u8 reg)
{
	int ret;
	ret = do_eeprom_cmd(dev, E2P_CMD_EPC_CMD_EWEN, reg);
	if (ret)
		goto done;
	ret = do_eeprom_cmd(dev, E2P_CMD_EPC_CMD_ERASE, reg);
	if (ret)
		goto done;
	smc911x_reg_write(dev, E2P_DATA, value);
	ret = do_eeprom_cmd(dev, E2P_CMD_EPC_CMD_WRITE, reg);
	if (ret)
		goto done;
	ret = do_eeprom_cmd(dev, E2P_CMD_EPC_CMD_EWDS, reg);
 done:
	return ret;
}