Skip to content

Commit

Permalink
Move PSU Quisce chipop to PIBMEM
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sgupta2m committed Aug 17, 2017
1 parent 36ceb0a commit 4a62126
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions src/sbefw/sbecmdgeneric.C
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down Expand Up @@ -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__

0 comments on commit 4a62126

Please sign in to comment.