src/dpdk/drivers/net/txgbe/base/txgbe_hw.c
s32 txgbe_init_thermal_sensor_thresh(struct txgbe_hw *hw)
{
	struct txgbe_thermal_sensor_data *data = &hw->mac.thermal_sensor_data;

	DEBUGFUNC("txgbe_init_thermal_sensor_thresh");

	memset(data, 0, sizeof(struct txgbe_thermal_sensor_data));

	if (hw->bus.lan_id != 0)
		return TXGBE_NOT_IMPLEMENTED;

	wr32(hw, TXGBE_TSCTRL, TXGBE_TSCTRL_EVALMD);
	wr32(hw, TXGBE_TSINTR,
		TXGBE_TSINTR_AEN | TXGBE_TSINTR_DEN);
	wr32(hw, TXGBE_TSEN, TXGBE_TSEN_ENA);


	data->sensor[0].alarm_thresh = 100;
	wr32(hw, TXGBE_TSATHRE, 677);
	data->sensor[0].dalarm_thresh = 90;
	wr32(hw, TXGBE_TSDTHRE, 614);

	return 0;
}
/**
 *  txgbe_init_thermal_sensor_thresh - Inits thermal sensor thresholds
 *  @hw: pointer to hardware structure
 *
 *  Inits the thermal sensor thresholds according to the NVM map
 *  and save off the threshold and location values into mac.thermal_sensor_data
 **/
Inits thermal sensor thresholds
@hw: pointer to hardware structure

Inits the thermal sensor thresholds according to the NVM map
and save off the threshold and location values into mac.thermal_sensor_data
Inits thermal sensor thresholds @hw : pointer to hardware structure Inits the thermal sensor thresholds according to the NVM map and save off the threshold and location values into mac . thermal_sensor_data
s32 txgbe_init_thermal_sensor_thresh(struct txgbe_hw *hw)
{
	struct txgbe_thermal_sensor_data *data = &hw->mac.thermal_sensor_data;
	DEBUGFUNC("txgbe_init_thermal_sensor_thresh");
	memset(data, 0, sizeof(struct txgbe_thermal_sensor_data));
	if (hw->bus.lan_id != 0)
		return TXGBE_NOT_IMPLEMENTED;
	wr32(hw, TXGBE_TSCTRL, TXGBE_TSCTRL_EVALMD);
	wr32(hw, TXGBE_TSINTR,
		TXGBE_TSINTR_AEN | TXGBE_TSINTR_DEN);
	wr32(hw, TXGBE_TSEN, TXGBE_TSEN_ENA);
	data->sensor[0].alarm_thresh = 100;
	wr32(hw, TXGBE_TSATHRE, 677);
	data->sensor[0].dalarm_thresh = 90;
	wr32(hw, TXGBE_TSDTHRE, 614);
	return 0;
}
s32 txgbe_init_thermal_sensor_thresh ( struct txgbe_hw * hw ) { struct txgbe_thermal_sensor_data * data = & hw -> mac . thermal_sensor_data ; DEBUGFUNC ( " " ) ; memset ( data , 0 , sizeof ( struct txgbe_thermal_sensor_data ) ) ; if ( hw -> bus . lan_id != 0 ) return TXGBE_NOT_IMPLEMENTED ; wr32 ( hw , TXGBE_TSCTRL , TXGBE_TSCTRL_EVALMD ) ; wr32 ( hw , TXGBE_TSINTR , TXGBE_TSINTR_AEN | TXGBE_TSINTR_DEN ) ; wr32 ( hw , TXGBE_TSEN , TXGBE_TSEN_ENA ) ; data -> sensor [ 0 ] . alarm_thresh = 100 ; wr32 ( hw , TXGBE_TSATHRE , 677 ) ; data -> sensor [ 0 ] . dalarm_thresh = 90 ; wr32 ( hw , TXGBE_TSDTHRE , 614 ) ; return 0 ; }
txgbe_init_thermal_sensor_thresh - Inits thermal sensor thresholds
  @hw: pointer to hardware structure
txgbe_init_thermal_sensor_thresh - Inits thermal sensor thresholds @hw : pointer to hardware structure