src/dpdk/drivers/net/e1000/base/e1000_82575.c
s32 e1000_set_i2c_bb(struct e1000_hw *hw)
{
	s32 ret_val = E1000_SUCCESS;
	u32 ctrl_ext, i2cparams;

	DEBUGFUNC("e1000_set_i2c_bb");

	ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
	ctrl_ext |= E1000_CTRL_I2C_ENA;
	E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
	E1000_WRITE_FLUSH(hw);

	i2cparams = E1000_READ_REG(hw, E1000_I2CPARAMS);
	i2cparams |= E1000_I2CBB_EN;
	i2cparams |= E1000_I2C_DATA_OE_N;
	i2cparams |= E1000_I2C_CLK_OE_N;
	E1000_WRITE_REG(hw, E1000_I2CPARAMS, i2cparams);
	E1000_WRITE_FLUSH(hw);

	return ret_val;
}
/**
 *  e1000_set_i2c_bb - Enable I2C bit-bang
 *  @hw: pointer to the HW structure
 *
 *  Enable I2C bit-bang interface
 *
 **/
Enable I2C bit-bang
@hw: pointer to the HW structure

Enable I2C bit-bang interface
Enable I2C bit - bang @hw : pointer to the HW structure Enable I2C bit - bang interface
s32 e1000_set_i2c_bb(struct e1000_hw *hw)
{
	s32 ret_val = E1000_SUCCESS;
	u32 ctrl_ext, i2cparams;
	DEBUGFUNC("e1000_set_i2c_bb");
	ctrl_ext = E1000_READ_REG(hw, E1000_CTRL_EXT);
	ctrl_ext |= E1000_CTRL_I2C_ENA;
	E1000_WRITE_REG(hw, E1000_CTRL_EXT, ctrl_ext);
	E1000_WRITE_FLUSH(hw);
	i2cparams = E1000_READ_REG(hw, E1000_I2CPARAMS);
	i2cparams |= E1000_I2CBB_EN;
	i2cparams |= E1000_I2C_DATA_OE_N;
	i2cparams |= E1000_I2C_CLK_OE_N;
	E1000_WRITE_REG(hw, E1000_I2CPARAMS, i2cparams);
	E1000_WRITE_FLUSH(hw);
	return ret_val;
}
s32 e1000_set_i2c_bb ( struct e1000_hw * hw ) { s32 ret_val = E1000_SUCCESS ; u32 ctrl_ext , i2cparams ; DEBUGFUNC ( " " ) ; ctrl_ext = E1000_READ_REG ( hw , E1000_CTRL_EXT ) ; ctrl_ext |= E1000_CTRL_I2C_ENA ; E1000_WRITE_REG ( hw , E1000_CTRL_EXT , ctrl_ext ) ; E1000_WRITE_FLUSH ( hw ) ; i2cparams = E1000_READ_REG ( hw , E1000_I2CPARAMS ) ; i2cparams |= E1000_I2CBB_EN ; i2cparams |= E1000_I2C_DATA_OE_N ; i2cparams |= E1000_I2C_CLK_OE_N ; E1000_WRITE_REG ( hw , E1000_I2CPARAMS , i2cparams ) ; E1000_WRITE_FLUSH ( hw ) ; return ret_val ; }
e1000_set_i2c_bb - Enable I2C bit-bang
  @hw: pointer to the HW structure
e1000_set_i2c_bb - Enable I2C bit - bang @hw : pointer to the HW structure