summaryrefslogtreecommitdiffstats
path: root/src/occ_405/amec/amec_slave_smh.c
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2016-12-19 16:07:30 -0600
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-02-01 11:06:24 -0500
commit009f439d2aa9df1944eb08b7f1fc30006abd8137 (patch)
tree719f526548b4c125984d45aeaa30051ae32c7afe /src/occ_405/amec/amec_slave_smh.c
parent11bf85d22eed50613085dfea02c4df9e53e1a380 (diff)
downloadtalos-occ-009f439d2aa9df1944eb08b7f1fc30006abd8137.tar.gz
talos-occ-009f439d2aa9df1944eb08b7f1fc30006abd8137.zip
WOF: Function to calculate VDD/VDN step number
1. Calculate VDN/VDD step number 2. Extract the WOF header address from the PGPE header 3. Save important data from WOF header into global struct 4. Create global pointer struct to save important addresses to a pinned location in memory. Change-Id: I2249777134608d9f79bdc85692a3acbf7907c3f5 RTC:130216 Depends-on: Ic323321b8c66945732a6b7345ad85d6f41a62edd Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/34300 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_405/amec/amec_slave_smh.c')
-rwxr-xr-xsrc/occ_405/amec/amec_slave_smh.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/occ_405/amec/amec_slave_smh.c b/src/occ_405/amec/amec_slave_smh.c
index 18db711..bf33cc4 100755
--- a/src/occ_405/amec/amec_slave_smh.c
+++ b/src/occ_405/amec/amec_slave_smh.c
@@ -55,13 +55,13 @@
#include <amec_health.h>
#include <amec_analytics.h>
#include <common.h>
+#include <occhw_async.h>
#include <wof.h>
//*************************************************************************
// Externs
//*************************************************************************
extern dcom_slv_inbox_t G_dcom_slv_inbox_rx;
-
//*************************************************************************
// Macros
//*************************************************************************
@@ -510,26 +510,28 @@ void amec_slv_state_4(void)
//-------------------------------------------------------
if( IS_OCC_STATE_ACTIVE() )
{
- /* TODO: RTC: 166301 - Logic to determine if WOF algorithm should run.
- static bool run_wof_algoritm = true;
- if( !run_wof_algorithm )
+ /* TODO: RTC 166301 - Logic to determine if WOF algorithm should run.
+ // The WOF algorithm is to be run every 4ms. Since amec_slv_state_4
+ // is run every 2ms, we need to skip every other invocation.
+ static bool L_run_wof_algorithm = true;
+ if( !L_run_wof_algorithm )
{
// When false, the last invocation decided we need to wait 2 ms
// run wof algo next time.
- run_wof_algorithm = true;
+ L_run_wof_algorithm = true;
}
else
{
//if IPC command is idle and ready to go
//{
//wof_main();
- run_wof_algorithm = false;
+ L_run_wof_algorithm = false;
//}
//else if IPC command is still waiting
//make thread wait another 2 ms
//{
- // run_wof_algorithm = true;
+ // L_run_wof_algorithm = true;
//}
//else if IPC command is returning an error
//{
OpenPOWER on IntegriCloud