src/dpdk/drivers/net/igc/base/igc_nvm.c
static void igc_standby_nvm(struct igc_hw *hw)
{
	struct igc_nvm_info *nvm = &hw->nvm;
	u32 eecd = IGC_READ_REG(hw, IGC_EECD);

	DEBUGFUNC("igc_standby_nvm");

	if (nvm->type == igc_nvm_eeprom_microwire) {
		eecd &= ~(IGC_EECD_CS | IGC_EECD_SK);
		IGC_WRITE_REG(hw, IGC_EECD, eecd);
		IGC_WRITE_FLUSH(hw);
		usec_delay(nvm->delay_usec);

		igc_raise_eec_clk(hw, &eecd);

		/* Select EEPROM */
		eecd |= IGC_EECD_CS;
		IGC_WRITE_REG(hw, IGC_EECD, eecd);
		IGC_WRITE_FLUSH(hw);
		usec_delay(nvm->delay_usec);

		igc_lower_eec_clk(hw, &eecd);
	} else if (nvm->type == igc_nvm_eeprom_spi) {
		/* Toggle CS to flush commands */
		eecd |= IGC_EECD_CS;
		IGC_WRITE_REG(hw, IGC_EECD, eecd);
		IGC_WRITE_FLUSH(hw);
		usec_delay(nvm->delay_usec);
		eecd &= ~IGC_EECD_CS;
		IGC_WRITE_REG(hw, IGC_EECD, eecd);
		IGC_WRITE_FLUSH(hw);
		usec_delay(nvm->delay_usec);
	}
}
/**
 *  igc_standby_nvm - Return EEPROM to standby state
 *  @hw: pointer to the HW structure
 *
 *  Return the EEPROM to a standby state.
 **/
Return EEPROM to standby state
@hw: pointer to the HW structure

Return the EEPROM to a standby state.
Return EEPROM to standby state @hw : pointer to the HW structure Return the EEPROM to a standby state .
static void igc_standby_nvm(struct igc_hw *hw)
{
	struct igc_nvm_info *nvm = &hw->nvm;
	u32 eecd = IGC_READ_REG(hw, IGC_EECD);
	DEBUGFUNC("igc_standby_nvm");
	if (nvm->type == igc_nvm_eeprom_microwire) {
		eecd &= ~(IGC_EECD_CS | IGC_EECD_SK);
		IGC_WRITE_REG(hw, IGC_EECD, eecd);
		IGC_WRITE_FLUSH(hw);
		usec_delay(nvm->delay_usec);
		igc_raise_eec_clk(hw, &eecd);
		eecd |= IGC_EECD_CS;
		IGC_WRITE_REG(hw, IGC_EECD, eecd);
		IGC_WRITE_FLUSH(hw);
		usec_delay(nvm->delay_usec);
		igc_lower_eec_clk(hw, &eecd);
	} else if (nvm->type == igc_nvm_eeprom_spi) {
		eecd |= IGC_EECD_CS;
		IGC_WRITE_REG(hw, IGC_EECD, eecd);
		IGC_WRITE_FLUSH(hw);
		usec_delay(nvm->delay_usec);
		eecd &= ~IGC_EECD_CS;
		IGC_WRITE_REG(hw, IGC_EECD, eecd);
		IGC_WRITE_FLUSH(hw);
		usec_delay(nvm->delay_usec);
	}
}
static void igc_standby_nvm ( struct igc_hw * hw ) { struct igc_nvm_info * nvm = & hw -> nvm ; u32 eecd = IGC_READ_REG ( hw , IGC_EECD ) ; DEBUGFUNC ( " " ) ; if ( nvm -> type == igc_nvm_eeprom_microwire ) { eecd &= ~ ( IGC_EECD_CS | IGC_EECD_SK ) ; IGC_WRITE_REG ( hw , IGC_EECD , eecd ) ; IGC_WRITE_FLUSH ( hw ) ; usec_delay ( nvm -> delay_usec ) ; igc_raise_eec_clk ( hw , & eecd ) ; eecd |= IGC_EECD_CS ; IGC_WRITE_REG ( hw , IGC_EECD , eecd ) ; IGC_WRITE_FLUSH ( hw ) ; usec_delay ( nvm -> delay_usec ) ; igc_lower_eec_clk ( hw , & eecd ) ; } else if ( nvm -> type == igc_nvm_eeprom_spi ) { eecd |= IGC_EECD_CS ; IGC_WRITE_REG ( hw , IGC_EECD , eecd ) ; IGC_WRITE_FLUSH ( hw ) ; usec_delay ( nvm -> delay_usec ) ; eecd &= ~ IGC_EECD_CS ; IGC_WRITE_REG ( hw , IGC_EECD , eecd ) ; IGC_WRITE_FLUSH ( hw ) ; usec_delay ( nvm -> delay_usec ) ; } }
igc_standby_nvm - Return EEPROM to standby state
  @hw: pointer to the HW structure
igc_standby_nvm - Return EEPROM to standby state @hw : pointer to the HW structure
/* Select EEPROM */ /* Toggle CS to flush commands */