summaryrefslogtreecommitdiffstats
path: root/src/occ
diff options
context:
space:
mode:
authorFadi Kassem <fmkassem@us.ibm.com>2015-04-10 16:33:48 -0500
committerStephan Broyles <sbroyles@us.ibm.com>2015-04-13 11:55:03 -0500
commitc473df288f702b1803205ac6eda4cc1781fec4f8 (patch)
tree3f1624376b3d67304414bb4006f326e458628c96 /src/occ
parentc967f548e6b8b27089fe8b8df5962a86a84c68df (diff)
downloadtalos-occ-c473df288f702b1803205ac6eda4cc1781fec4f8.tar.gz
talos-occ-c473df288f702b1803205ac6eda4cc1781fec4f8.zip
Fixed issue where OCC goes into Safe Mode due to low APSS reading.
Change-Id: I93aa4f15eab5c1c58284b4a3d5e0b7609b252c56 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/17016 Reviewed-by: Stephan Broyles <sbroyles@us.ibm.com> Tested-by: Stephan Broyles <sbroyles@us.ibm.com>
Diffstat (limited to 'src/occ')
-rwxr-xr-xsrc/occ/amec/amec_sensors_power.c5
-rwxr-xr-xsrc/occ/cmdh/cmdh_fsp_cmds.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/occ/amec/amec_sensors_power.c b/src/occ/amec/amec_sensors_power.c
index 484060f..c123906 100755
--- a/src/occ/amec/amec_sensors_power.c
+++ b/src/occ/amec/amec_sensors_power.c
@@ -150,6 +150,11 @@ uint32_t amec_value_from_apss_adc(uint8_t i_chan)
{
l_raw += l_offset;
}
+ //Check to see if l_raw is negative. If so, set raw to 0
+ if (l_raw & 0x8000)
+ {
+ l_raw = 0;
+ }
l_temp = ((uint32_t)l_raw * l_gain);
// Reduce value back to mA or mV
diff --git a/src/occ/cmdh/cmdh_fsp_cmds.c b/src/occ/cmdh/cmdh_fsp_cmds.c
index d6e2763..d0f268c 100755
--- a/src/occ/cmdh/cmdh_fsp_cmds.c
+++ b/src/occ/cmdh/cmdh_fsp_cmds.c
@@ -5,10 +5,10 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2011,2014 */
-/* [+] Google Inc. */
+/* Contributors Listed Below - COPYRIGHT 2011,2015 */
/* [+] International Business Machines Corp. */
/* */
+/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
/* you may not use this file except in compliance with the License. */
/* You may obtain a copy of the License at */
@@ -429,7 +429,7 @@ ERRL_RC cmdh_poll_v10(cmdh_fsp_rsp_t * o_rsp_ptr)
cmdh_poll_pcaps_sensor_t l_pcapData;
- l_pcapData.current = G_sysConfigData.pcap.system_pcap;
+ l_pcapData.current = g_amec->pcap.active_node_pcap;
l_pcapData.system = G_amec_sensor_list[PWR250US]->sample;
l_pcapData.n = G_sysConfigData.pcap.oversub_pcap;
l_pcapData.max = G_sysConfigData.pcap.max_pcap;
OpenPOWER on IntegriCloud