diff options
| author | Adam Muhle <armuhle@us.ibm.com> | 2011-10-13 14:44:55 -0500 |
|---|---|---|
| committer | ADAM R. MUHLE <armuhle@us.ibm.com> | 2011-10-25 15:17:19 -0500 |
| commit | 7344f3b265fe12da99ad0a032e558e7cc7fe1cb2 (patch) | |
| tree | ff7bd2d0d9ac139e63a0f8bda778e3dac1b290f8 /src/usr/scom/scom.C | |
| parent | 0ad20184aec21ef0560a9eee7e7c26a36ace07e1 (diff) | |
| download | talos-hostboot-7344f3b265fe12da99ad0a032e558e7cc7fe1cb2.tar.gz talos-hostboot-7344f3b265fe12da99ad0a032e558e7cc7fe1cb2.zip | |
Base FSISCOM Support and test Cases. (Story 3880)
Change-Id: Ia65187cd475da725250a17cec59b1aa6ff805f84
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/453
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Tested-by: Jenkins Server
Diffstat (limited to 'src/usr/scom/scom.C')
| -rw-r--r-- | src/usr/scom/scom.C | 46 |
1 files changed, 39 insertions, 7 deletions
diff --git a/src/usr/scom/scom.C b/src/usr/scom/scom.C index 9e67a40af..895724d4d 100644 --- a/src/usr/scom/scom.C +++ b/src/usr/scom/scom.C @@ -29,16 +29,22 @@ /*****************************************************************************/ // I n c l u d e s /*****************************************************************************/ +#include <assert.h> #include <devicefw/driverif.H> #include <trace/interface.H> #include <errl/errlentry.H> #include <errl/errlmanager.H> #include "scom.H" +// Trace definition +trace_desc_t* g_trac_scom = NULL; +TRAC_INIT(&g_trac_scom, "SCOM", 1024); //1K + + namespace SCOM { -// Register SCom access functions to DD framework +// Register Scom access functions to DD framework DEVICE_REGISTER_ROUTE(DeviceFW::WILDCARD, DeviceFW::SCOM, TARGETING::TYPE_PROC, @@ -55,14 +61,40 @@ errlHndl_t scomPerformOp(DeviceFW::OperationType i_opType, { errlHndl_t l_err = NULL; - //@todo - For now, just call XSCOM - l_err = deviceOp(i_opType, - i_target, - io_buffer, - io_buflen, - DEVICE_XSCOM_ADDRESS(va_arg(i_args,uint64_t))); + do{ + //Always XSCOM the Master Sentinel + if((TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL == i_target) || + (i_target->getAttr<TARGETING::ATTR_SCOM_SWITCHES>().useXscom)) + { //do XSCOM + + l_err = deviceOp(i_opType, + i_target, + io_buffer, + io_buflen, + DEVICE_XSCOM_ADDRESS(va_arg(i_args,uint64_t))); + break; + } + else if(i_target->getAttr<TARGETING::ATTR_SCOM_SWITCHES>().useFsiScom) + { //do FSISCOM + l_err = deviceOp(i_opType, + i_target, + io_buffer, + io_buflen, + DEVICE_FSISCOM_ADDRESS(va_arg(i_args,uint64_t))); + if( l_err ) { break; } + } + else + { + //@todo - add target info to assert trace + assert(0,"SCOM::scomPerformOp> ATTR_SCOM_SWITCHES does not indicate Xscom or FSISCOM is supported"); + break; + } + + }while(0); return l_err; } + + } // end namespace |

