diff options
author | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-08-17 10:18:51 -0500 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-08-17 13:55:32 -0400 |
commit | 4a621260c91e04eae8c44894d32a6aeda53c5c54 (patch) | |
tree | 713a82ade3542b75beec99cc1b2e8a367ff59f5f /src/sbefw/sbecmdgeneric.C | |
parent | 36ceb0a36fed298ab54013782ec562b231841a1f (diff) | |
download | talos-sbe-4a621260c91e04eae8c44894d32a6aeda53c5c54.tar.gz talos-sbe-4a621260c91e04eae8c44894d32a6aeda53c5c54.zip |
Move PSU Quisce chipop to PIBMEM
Change-Id: Ie2600a441b60edf6c8c5fa40dea917172ca294f4
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/44739
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/sbefw/sbecmdgeneric.C')
-rw-r--r-- | src/sbefw/sbecmdgeneric.C | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/src/sbefw/sbecmdgeneric.C b/src/sbefw/sbecmdgeneric.C index 6702c217..bffb67db 100644 --- a/src/sbefw/sbecmdgeneric.C +++ b/src/sbefw/sbecmdgeneric.C @@ -277,47 +277,6 @@ uint32_t sbeSetFFDCAddr(uint8_t *i_pArg) #undef SBE_FUNC } -//---------------------------------------------------------------------------- -uint32_t sbePsuQuiesce( uint8_t *i_pArg ) -{ - #define SBE_FUNC "sbePsuQuiesce" - uint32_t rc = SBE_SEC_OPERATION_SUCCESSFUL; - - do - { - // Send Ack to Host via SBE_SBE2PSU_DOORBELL_SET_BIT1 - // This util method will check internally on the mbox0 register if - // ACK is requested. - rc = sbeAcknowledgeHost(); - if (rc != SBE_SEC_OPERATION_SUCCESSFUL) - { - SBE_ERROR(SBE_FUNC " Failed to Sent Ack to Host over " - "SBE_SBE2PSU_DOORBELL_SET_BIT1"); - break; - } - - // Set Quiesce State - (void)SbeRegAccess::theSbeRegAccess().stateTransition( - SBE_QUIESCE_EVENT); - - rc = sbeWriteSbe2PsuMbxReg(SBE_HOST_PSU_MBOX_REG4, - (uint64_t*)(&SBE_GLOBAL->sbeSbe2PsuRespHdr), - (sizeof(SBE_GLOBAL->sbeSbe2PsuRespHdr)/sizeof(uint64_t)), - true); - if(rc != SBE_SEC_OPERATION_SUCCESSFUL) - { - SBE_ERROR(SBE_FUNC" Failed to write SBE_HOST_PSU_MBOX_REG4"); - // Not Breaking here since we can't revert back on the set state - } - }while(0); - - if( rc ) - { - SBE_ERROR( SBE_FUNC"Failed. rc[0x%X]", rc); - } - return rc; - #undef SBE_FUNC -} #endif //__SBEFW_SEEPROM__ #ifndef __SBEFW_SEEPROM__ @@ -395,5 +354,46 @@ uint32_t sbeFifoQuiesce( uint8_t *i_pArg ) #undef SBE_FUNC } +//---------------------------------------------------------------------------- +uint32_t sbePsuQuiesce( uint8_t *i_pArg ) +{ + #define SBE_FUNC "sbePsuQuiesce" + uint32_t rc = SBE_SEC_OPERATION_SUCCESSFUL; + + do + { + // Send Ack to Host via SBE_SBE2PSU_DOORBELL_SET_BIT1 + // This util method will check internally on the mbox0 register if + // ACK is requested. + rc = sbeAcknowledgeHost(); + if (rc != SBE_SEC_OPERATION_SUCCESSFUL) + { + SBE_ERROR(SBE_FUNC " Failed to Sent Ack to Host over " + "SBE_SBE2PSU_DOORBELL_SET_BIT1"); + break; + } + + // Set Quiesce State + (void)SbeRegAccess::theSbeRegAccess().stateTransition( + SBE_QUIESCE_EVENT); + + rc = sbeWriteSbe2PsuMbxReg(SBE_HOST_PSU_MBOX_REG4, + (uint64_t*)(&SBE_GLOBAL->sbeSbe2PsuRespHdr), + (sizeof(SBE_GLOBAL->sbeSbe2PsuRespHdr)/sizeof(uint64_t)), + true); + if(rc != SBE_SEC_OPERATION_SUCCESSFUL) + { + SBE_ERROR(SBE_FUNC" Failed to write SBE_HOST_PSU_MBOX_REG4"); + // Not Breaking here since we can't revert back on the set state + } + }while(0); + + if( rc ) + { + SBE_ERROR( SBE_FUNC"Failed. rc[0x%X]", rc); + } + return rc; + #undef SBE_FUNC +} #endif //not __SBEFW_SEEPROM__ |