summaryrefslogtreecommitdiffstats
path: root/src/occ_405/amec/amec_sensors_power.c
diff options
context:
space:
mode:
authorChris Cain <cjcain@us.ibm.com>2016-10-24 16:28:57 -0500
committerChristopher J. Cain <cjcain@us.ibm.com>2016-10-27 16:14:21 -0400
commit567a3d045dad8431b0a73fbbfac95332475d5b0a (patch)
treebc49a4a416bbb189f881e0f81032ad48a6215d75 /src/occ_405/amec/amec_sensors_power.c
parentf18d4c19387deabb78c030a5c25ec09afb08019e (diff)
downloadtalos-occ-567a3d045dad8431b0a73fbbfac95332475d5b0a.tar.gz
talos-occ-567a3d045dad8431b0a73fbbfac95332475d5b0a.zip
Sensor updates for AVS Bus data collection
RTC: 137620 Change-Id: I2e394fdff7672c0a76c78c5d0f7f57885f1c5cfd Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31757 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Diffstat (limited to 'src/occ_405/amec/amec_sensors_power.c')
-rwxr-xr-xsrc/occ_405/amec/amec_sensors_power.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/occ_405/amec/amec_sensors_power.c b/src/occ_405/amec/amec_sensors_power.c
index 912d5b0..787d0dc 100755
--- a/src/occ_405/amec/amec_sensors_power.c
+++ b/src/occ_405/amec/amec_sensors_power.c
@@ -267,7 +267,7 @@ void amec_update_apss_sensors(void)
temp32 = ((l_vdd * l_bulk_voltage)+ADCMULT_ROUND)/ADCMULT_TO_UNITS;
sensor_update( AMECSENSOR_PTR(PWR250USVDD0), (uint16_t)temp32);
temp32 = ((l_vcs_vio_vpcie * l_bulk_voltage)+ADCMULT_ROUND)/ADCMULT_TO_UNITS;
- sensor_update( AMECSENSOR_PTR(PWR250USVCS0), (uint16_t)temp32);
+ sensor_update( AMECSENSOR_PTR(PWRVCSVIOVDN), (uint16_t)temp32);
// ----------------------------------------------------
// Convert Other Raw Misc Power from APSS into sensors
@@ -529,8 +529,8 @@ void amec_update_external_voltage()
l_temp = (l_data & 0x00FF0000) >>16;
l_vcs = 16125 - ((uint32_t)l_temp * 625)/10;
- sensor_update( AMECSENSOR_PTR(VOLT250USP0V0), (uint16_t) l_vdd);
- sensor_update( AMECSENSOR_PTR(VOLT250USP0V1), (uint16_t) l_vcs);
+ sensor_update( AMECSENSOR_PTR(VOLTVDD), (uint16_t) l_vdd);
+ sensor_update( AMECSENSOR_PTR(VOLTVDN), (uint16_t) l_vcs);
}
// Function Specification
@@ -538,7 +538,7 @@ void amec_update_external_voltage()
// Name: amec_update_current_sensor
//
// Description: Estimates Vdd output current based on input power and Vdd voltage setting.
-// Compute CUR250USVDD0 (current out of Vdd regulator)
+// Compute CURVDD (current out of Vdd regulator)
//
// Flow:
//
@@ -553,7 +553,7 @@ void amec_update_current_sensor(void)
{
uint32_t result32; //temporary result
uint16_t l_pow_reg_input_dW = AMECSENSOR_PTR(PWR250USVDD0)->sample * 10; // convert to dW by *10.
- uint16_t l_vdd_reg = AMECSENSOR_PTR(VOLT250USP0V0)->sample;
+ uint16_t l_vdd_reg = AMECSENSOR_PTR(VOLTVDD)->sample;
uint32_t l_pow_reg_output_mW;
uint32_t l_curr_output;
@@ -582,9 +582,9 @@ void amec_update_current_sensor(void)
// p_out: max=300M (dW*0.00001) in 29 bits
// v_out: min=5000 (0.0001 V) max=16000(0.0001 V) in 14 bits
// i_out: max = 300M/5000 = 60000 (dW*0.00001/(0.0001V)= 0.01A), in 16 bits.
- // VOLT250USP0V0 in units of 0.0001 V = 0.1 mV. (multiply by 0.1 to get mV)
+ // VOLTVDD in units of 0.0001 V = 0.1 mV. (multiply by 0.1 to get mV)
l_curr_output = l_pow_reg_output_mW / l_vdd_reg;
- sensor_update(AMECSENSOR_PTR(CUR250USVDD0), l_curr_output);
+ sensor_update(AMECSENSOR_PTR(CURVDD), l_curr_output);
}
OpenPOWER on IntegriCloud