Skip to content

Commit c64aaa7

Browse files
lefurgywilbryan
authored andcommitted
WOF: update core leakage current in power off state
Change-Id: I0bc5ebe8a3d30ff24ae0dd7abe54484721925470 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/23842 Tested-by: FSP CI Jenkins Reviewed-by: ANDRES A. LUGO-REYES <aalugore@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
1 parent 0069c08 commit c64aaa7

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

src/occ/amec/amec_sensors_core.c

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* */
66
/* OpenPOWER OnChipController Project */
77
/* */
8-
/* Contributors Listed Below - COPYRIGHT 2011,2015 */
8+
/* Contributors Listed Below - COPYRIGHT 2011,2016 */
99
/* [+] International Business Machines Corp. */
1010
/* */
1111
/* */
@@ -174,19 +174,6 @@ void amec_update_proc_core_sensors(uint8_t i_core)
174174
//-------------------------------------------------------
175175
amec_calc_spurr(i_core);
176176

177-
//-------------------------------------------------------
178-
// Voltage
179-
//-------------------------------------------------------
180-
amec_sensors_core_voltage(i_core);
181-
182-
//-------------------------------------------------------
183-
// Leakage current (for WOF)
184-
// Note: Run after core temperature and voltage updates
185-
// amec_calc_dts_sensors()
186-
// amec_sensors_core_voltage()
187-
//-------------------------------------------------------
188-
amec_wof_calc_core_leakage(i_core);
189-
190177
// ------------------------------------------------------
191178
// Update PREVIOUS values for next time
192179
// ------------------------------------------------------
@@ -222,6 +209,24 @@ void amec_update_proc_core_sensors(uint8_t i_core)
222209
// hi 3 bits in 0.796 day resolution with 512MHz TOD clock
223210
sensor_update( AMECSENSOR_PTR(TODclock2), l_temp16);
224211
}
212+
213+
// Always update core voltage and leakage current even when
214+
// core is turned off. Required for correct WOF operation.
215+
if(CORE_PRESENT(i_core))
216+
{
217+
//-------------------------------------------------------
218+
// Voltage
219+
//-------------------------------------------------------
220+
amec_sensors_core_voltage(i_core);
221+
222+
//-------------------------------------------------------
223+
// Leakage current (for WOF)
224+
// Note: Run after core temperature and voltage updates
225+
// amec_calc_dts_sensors()
226+
// amec_sensors_core_voltage()
227+
//-------------------------------------------------------
228+
amec_wof_calc_core_leakage(i_core);
229+
}
225230
}
226231

227232

0 commit comments

Comments
 (0)