summaryrefslogtreecommitdiffstats
path: root/sbe/sbefw/sbeexeintf.H
diff options
context:
space:
mode:
authorRaja Das <rajadas2@in.ibm.com>2016-06-09 02:08:03 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2016-07-16 00:50:10 -0400
commit96122ae5a9487bab1d5d1d631565c289f2cdb075 (patch)
tree6419849b053b9ab1ee4c8ce4554f91fa2906ef61 /sbe/sbefw/sbeexeintf.H
parent813a589d1df68fcea67e0265627f03c77f7d5780 (diff)
downloadtalos-sbe-96122ae5a9487bab1d5d1d631565c289f2cdb075.tar.gz
talos-sbe-96122ae5a9487bab1d5d1d631565c289f2cdb075.zip
Synchronization of Command Handling
Change-Id: Iefec280c27f432c9624e8fd3abf78f6bb0ee3adb RTC: 150470 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25538 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Shakeeb A. Pasha B K <shakeebbk@in.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'sbe/sbefw/sbeexeintf.H')
-rw-r--r--sbe/sbefw/sbeexeintf.H80
1 files changed, 73 insertions, 7 deletions
diff --git a/sbe/sbefw/sbeexeintf.H b/sbe/sbefw/sbeexeintf.H
index 6f43784d..e871632a 100644
--- a/sbe/sbefw/sbeexeintf.H
+++ b/sbe/sbefw/sbeexeintf.H
@@ -1,3 +1,27 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: sbe/sbefw/sbeexeintf.H $ */
+/* */
+/* OpenPOWER sbe Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* [+] 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 */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
/*
* @file: ppe/sbe/sbefw/sbeexeintf.H
*
@@ -89,27 +113,69 @@ typedef enum
SBE_INTERFACE_FIFO_RESET = 0x04,
} sbeInterfaceSrc_t;
+/*
+ * @brief Enum for Handler, handling the interrupt and setting/clearing the
+ * interrupt variable
+ */
+typedef enum
+{
+ SBE_ALL_HANDLER = 0x0,
+ SBE_INTERRUPT_ROUTINE = 0x1,
+ SBE_RX_ROUTINE = 0x2,
+ SBE_PROC_ROUTINE = 0x3,
+} sbeHandler_t;
+
/**
* @brief structure for SBE external Interrupt handling
*
*/
typedef struct
{
- uint8_t l_intrSource;
+ uint8_t intrSource;
+ uint8_t rxThrIntrSource;
+ uint8_t procThrIntrSource;
- void setIntrSource(const sbeInterfaceSrc_t i_val)
+ void setIntrSource(const sbeHandler_t i_handler,
+ const sbeInterfaceSrc_t i_val)
{
- l_intrSource |= i_val;
+ switch(i_handler)
+ {
+ case SBE_INTERRUPT_ROUTINE: intrSource |= i_val; break;
+ case SBE_RX_ROUTINE: rxThrIntrSource |= i_val; break;
+ case SBE_PROC_ROUTINE: procThrIntrSource |= i_val; break;
+ case SBE_ALL_HANDLER: break;
+ }
}
- void clearIntrSource(const sbeInterfaceSrc_t i_val)
+ void clearIntrSource(const sbeHandler_t i_handler,
+ const sbeInterfaceSrc_t i_val)
{
- l_intrSource &= ~i_val;
+ switch(i_handler)
+ {
+ case SBE_INTERRUPT_ROUTINE: intrSource &= ~i_val; break;
+ case SBE_RX_ROUTINE: rxThrIntrSource &= ~i_val; break;
+ case SBE_PROC_ROUTINE: procThrIntrSource &= ~i_val; break;
+ case SBE_ALL_HANDLER:
+ {
+ intrSource &= ~i_val;
+ rxThrIntrSource &= ~i_val;
+ procThrIntrSource &= ~i_val;
+ break;
+ }
+ }
}
- bool isSet (const sbeInterfaceSrc_t i_val)
+ bool isSet (const sbeHandler_t i_handler, const sbeInterfaceSrc_t i_val)
{
- return (l_intrSource & i_val);
+ bool l_ret = false;
+ switch(i_handler)
+ {
+ case SBE_INTERRUPT_ROUTINE: l_ret = (intrSource & i_val); break;
+ case SBE_RX_ROUTINE: l_ret = (rxThrIntrSource & i_val); break;
+ case SBE_PROC_ROUTINE: l_ret = (procThrIntrSource & i_val); break;
+ case SBE_ALL_HANDLER: break;
+ }
+ return l_ret;
}
} sbeIntrHandle_t;
extern sbeIntrHandle_t g_sbeIntrSource ;
OpenPOWER on IntegriCloud