diff options
author | Chris Cain <cjcain@us.ibm.com> | 2015-01-14 09:23:57 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-01-22 17:40:08 -0600 |
commit | d84c27a1ba1c915e0fdcb2b638d729fe1bdff4fe (patch) | |
tree | 2135aa332fc89e1275934d8e2948cb2168a35dff /src/usr/htmgt/htmgt_occ.H | |
parent | 38cfbf78f1b0393131bb6d7772d7e9948b03096e (diff) | |
download | talos-hostboot-d84c27a1ba1c915e0fdcb2b638d729fe1bdff4fe.tar.gz talos-hostboot-d84c27a1ba1c915e0fdcb2b638d729fe1bdff4fe.zip |
Add support for linux command to set OCC state.
Change-Id: I1ac4d810e0f4509dc89c645bef183f5cb2179b1c
RTC: 115213
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15154
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Matt Spinler <spinler@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/htmgt/htmgt_occ.H')
-rw-r--r-- | src/usr/htmgt/htmgt_occ.H | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/usr/htmgt/htmgt_occ.H b/src/usr/htmgt/htmgt_occ.H index ec0216aa6..398cf928e 100644 --- a/src/usr/htmgt/htmgt_occ.H +++ b/src/usr/htmgt/htmgt_occ.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014 */ +/* Contributors Listed Below - COPYRIGHT 2014,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -278,19 +278,37 @@ namespace HTMGT /** - * @brief Set the state of the OCCs + * @brief Set the state of the OCCs. If i_state is + * not specified (NO_CHANGE), OCCs will be set + * to the target state (last requested state + * or if not requested the default is ACTIVE) * * @param[in] i_state Desired OCC state * * @return NULL on success, or error handle on failure */ - errlHndl_t setOccState(const occStateId i_state); + errlHndl_t setOccState(const occStateId i_state = + OCC_STATE_NO_CHANGE); + + + /** + * @brief Get the OCC state that should be used after the OCCs + * have been loaded or reset + * + * @note Target state will default to ACTIVE, but + * can be changed with HTMGT::enableOccActuation() + * + * @return target state + */ + static occStateId getTargetState(); + private: Occ * iv_occMaster; std::vector<Occ*> iv_occArray; occStateId iv_state; + occStateId iv_targetState; /* See buildOccs() above */ uint32_t _buildOccs(); @@ -304,6 +322,10 @@ namespace HTMGT std::vector<Occ*> _getOccArray() { return iv_occArray; }; + /* See getTargetState() above */ + occStateId _getTargetState() { return iv_targetState; }; + + /** * @brief Remove all OCC objects */ |