summaryrefslogtreecommitdiffstats
path: root/src/occ_gpe0/firdata/scom_util.c
diff options
context:
space:
mode:
authorPrachi Gupta <pragupta@us.ibm.com>2017-07-16 09:53:32 -0500
committerWilliam A. Bryan <wilbryan@us.ibm.com>2017-07-21 16:26:29 -0400
commitcbedccff001c94de84fdc01d1ea8a38a8264598e (patch)
treee9b1ebae6fa2d95d4a9c0aea586888431d21ce7f /src/occ_gpe0/firdata/scom_util.c
parentf301809e56b82fe61260a15f437183976db9ef75 (diff)
downloadtalos-occ-cbedccff001c94de84fdc01d1ea8a38a8264598e.tar.gz
talos-occ-cbedccff001c94de84fdc01d1ea8a38a8264598e.zip
rt_xstop_analysis: compile all of firdata on gpe0
Change-Id: I804cdf63879a2b80c9e14149e45ee665240c4a88 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43244 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Brian J. Stegmiller <bjs@us.ibm.com> Reviewed-by: Zane C. Shelley <zshelle@us.ibm.com> Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com> Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com> Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_gpe0/firdata/scom_util.c')
-rw-r--r--src/occ_gpe0/firdata/scom_util.c92
1 files changed, 2 insertions, 90 deletions
diff --git a/src/occ_gpe0/firdata/scom_util.c b/src/occ_gpe0/firdata/scom_util.c
index 7709017..491c213 100644
--- a/src/occ_gpe0/firdata/scom_util.c
+++ b/src/occ_gpe0/firdata/scom_util.c
@@ -26,16 +26,12 @@
/* Support for SCOM operations */
#include <fsi.h>
#include <native.h>
-#include <occhw_async.h>
-#include "occ_common.h"
#include "gpe_export.h"
#include <scom_util.h>
#include "scom_addr_util.h"
#include <sbe_fifo.h>
bool G_request_created = FALSE;
-GPE_BUFFER(ipc_scom_op_t G_scom_op);
-GpeRequest G_request;
enum {
/*FSI addresses are byte offsets, so need to multiply by 4
@@ -359,50 +355,8 @@ int32_t getscomraw( SCOM_Trgt_t i_chip, uint32_t i_addr, uint64_t * o_val )
{
return getFifoScom(&i_chip, i_addr, o_val);
}
-
- if(!G_request_created) //Only need to create request once
- {
- l_rc = gpe_request_create(&G_request, //Request
- &G_async_gpe_queue0, //Queue
- IPC_ST_SCOM_OPERATION, //Function ID
- &G_scom_op, //GPE arguments
- SSX_SECONDS(5), //Timeout
- NULL, //Callback function
- NULL, //Callback args
- ASYNC_REQUEST_BLOCKING); //Options
- if(l_rc)
- {
- TRAC_ERR("getscomraw: failed to create gpe request, rc=0x%08X", l_rc);
- return l_rc;
- }
- else
- {
- G_request_created = TRUE;
- }
- }
-
- //Pack in the request data
- G_scom_op.read = TRUE;
- G_scom_op.addr = i_addr;
-
- l_rc = gpe_request_schedule(&G_request);
- if(l_rc)
- {
- TRAC_ERR("getscomraw: failed to schedule gpe request, rc=0x%08X", l_rc);
- return l_rc;
- }
-
- //Since it's a blocking request, it should be completed by the time we
- //get here. If it's not, then a timeout has occurred.
- if(G_request.request.completion_state == ASYNC_REQUEST_STATE_COMPLETE)
- {
- *o_val = G_scom_op.data;
- }
- else
- {
- *o_val = 0;
- l_rc = FAIL;
- }
+ *o_val = 0;
+ l_rc = FAIL;
return l_rc;
}
@@ -423,48 +377,6 @@ int32_t putscomraw( SCOM_Trgt_t i_chip, uint32_t i_addr, uint64_t i_val )
{
return putFifoScom(&i_chip, i_addr, i_val);
}
-
- if(!G_request_created) //Only need to create request once
- {
- l_rc = gpe_request_create(&G_request, //Request
- &G_async_gpe_queue0, //Queue
- IPC_ST_SCOM_OPERATION, //Function ID
- &G_scom_op, //GPE arguments
- SSX_SECONDS(5), //Timeout
- NULL, //Callback function
- NULL, //Callback args
- ASYNC_REQUEST_BLOCKING); //Options
- if(l_rc)
- {
- TRAC_ERR("putscomraw gpe request create failed, rc = 0x%08x", l_rc);
- return l_rc;
- }
- else
- {
- G_request_created = TRUE;
- }
- }
-
- //Pack in the request data
- G_scom_op.read = FALSE;
- G_scom_op.addr = i_addr;
- G_scom_op.data = i_val;
-
- l_rc = gpe_request_schedule(&G_request);
- if(l_rc)
- {
- TRAC_ERR("putscomraw gpe request schedule failed, rc=0x%08X", l_rc);
- return l_rc;
- }
-
- //It's a blocking request, so if the request hasn't been completed by this
- //time, then a timeout has occurred.
- if(G_request.request.completion_state != ASYNC_REQUEST_STATE_COMPLETE)
- {
- TRAC_ERR("putscomraw gpe request failed to complete, rc = 0x%08x", l_rc);
- l_rc = FAIL;
- }
-
return l_rc;
}
OpenPOWER on IntegriCloud