/* ixgbe_shift_out_eeprom_bits - Shift data bits out to the EEPROM. @hw: pointer to hardware structure @data: data to send to the EEPROM @count: number of bits to shift out  */
static void ixgbe_shift_out_eeprom_bits(struct ixgbe_hw *hw, u16 data, u16 count)
/* ixgbe_shift_out_eeprom_bits - Shift data bits out to the EEPROM. @hw: pointer to hardware structure @data: data to send to the EEPROM @count: number of bits to shift out  */
static void ixgbe_shift_out_eeprom_bits(struct ixgbe_hw *hw, u16 data, u16 count)
{
	u32 eec;
	u32 mask;
	u32 i;
	eec = IXGBE_READ_REG(hw, IXGBE_EEC);
	mask = 0x01 << (count - 1);
	for (i = 0; i < count; i++) {
		if (data & mask)
			eec |= IXGBE_EEC_DI;
		else
			eec &= ~IXGBE_EEC_DI;
		IXGBE_WRITE_REG(hw, IXGBE_EEC, eec);
		IXGBE_WRITE_FLUSH(hw);
		udelay(1);
		ixgbe_raise_eeprom_clk(hw, &eec);
		ixgbe_lower_eeprom_clk(hw, &eec);
		mask = mask >> 1;
	};
	eec &= ~IXGBE_EEC_DI;
	IXGBE_WRITE_REG(hw, IXGBE_EEC, eec);
	IXGBE_WRITE_FLUSH(hw);
}