src/dpdk/drivers/net/ixgbe/base/ixgbe_x540.c
s32 ixgbe_init_eeprom_params_X540(struct ixgbe_hw *hw)
{
	struct ixgbe_eeprom_info *eeprom = &hw->eeprom;
	u32 eec;
	u16 eeprom_size;

	DEBUGFUNC("ixgbe_init_eeprom_params_X540");

	if (eeprom->type == ixgbe_eeprom_uninitialized) {
		eeprom->semaphore_delay = 10;
		eeprom->type = ixgbe_flash;

		eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw));
		eeprom_size = (u16)((eec & IXGBE_EEC_SIZE) >>
				    IXGBE_EEC_SIZE_SHIFT);
		eeprom->word_size = 1 << (eeprom_size +
					  IXGBE_EEPROM_WORD_SIZE_SHIFT);

		DEBUGOUT2("Eeprom params: type = %d, size = %d\n",
			  eeprom->type, eeprom->word_size);
	}

	return IXGBE_SUCCESS;
}
/**
 * ixgbe_init_eeprom_params_X540 - Initialize EEPROM params
 * @hw: pointer to hardware structure
 *
 * Initializes the EEPROM parameters ixgbe_eeprom_info within the
 * ixgbe_hw struct in order to set up EEPROM access.
 **/
Initialize EEPROM params
@hw: pointer to hardware structure

Initializes the EEPROM parameters ixgbe_eeprom_info within the
ixgbe_hw struct in order to set up EEPROM access.
Initialize EEPROM params @hw : pointer to hardware structure Initializes the EEPROM parameters ixgbe_eeprom_info within the ixgbe_hw struct in order to set up EEPROM access .
s32 ixgbe_init_eeprom_params_X540(struct ixgbe_hw *hw)
{
	struct ixgbe_eeprom_info *eeprom = &hw->eeprom;
	u32 eec;
	u16 eeprom_size;
	DEBUGFUNC("ixgbe_init_eeprom_params_X540");
	if (eeprom->type == ixgbe_eeprom_uninitialized) {
		eeprom->semaphore_delay = 10;
		eeprom->type = ixgbe_flash;
		eec = IXGBE_READ_REG(hw, IXGBE_EEC_BY_MAC(hw));
		eeprom_size = (u16)((eec & IXGBE_EEC_SIZE) >>
				    IXGBE_EEC_SIZE_SHIFT);
		eeprom->word_size = 1 << (eeprom_size +
					  IXGBE_EEPROM_WORD_SIZE_SHIFT);
		DEBUGOUT2("Eeprom params: type = %d, size = %d\n",
			  eeprom->type, eeprom->word_size);
	}
	return IXGBE_SUCCESS;
}
s32 ixgbe_init_eeprom_params_X540 ( struct ixgbe_hw * hw ) { struct ixgbe_eeprom_info * eeprom = & hw -> eeprom ; u32 eec ; u16 eeprom_size ; DEBUGFUNC ( " " ) ; if ( eeprom -> type == ixgbe_eeprom_uninitialized ) { eeprom -> semaphore_delay = 10 ; eeprom -> type = ixgbe_flash ; eec = IXGBE_READ_REG ( hw , IXGBE_EEC_BY_MAC ( hw ) ) ; eeprom_size = ( u16 ) ( ( eec & IXGBE_EEC_SIZE ) >> IXGBE_EEC_SIZE_SHIFT ) ; eeprom -> word_size = 1 << ( eeprom_size + IXGBE_EEPROM_WORD_SIZE_SHIFT ) ; DEBUGOUT2 ( " \n " , eeprom -> type , eeprom -> word_size ) ; } return IXGBE_SUCCESS ; }
ixgbe_init_eeprom_params_X540 - Initialize EEPROM params
 @hw: pointer to hardware structure
ixgbe_init_eeprom_params_X540 - Initialize EEPROM params @hw : pointer to hardware structure