From e52f9abcc8460f0bdb2c02c09d1678ddf9dab6ed Mon Sep 17 00:00:00 2001 From: Greg Still Date: Mon, 11 Sep 2017 13:04:32 -0500 Subject: PM: clear OCB Heartbeat enable during pm_reset Change-Id: Iff6f5b61c4dfeb32b20a20088c2cd95e1e9a8c60 RTC: 172638 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46027 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: RANGANATHPRASAD G. BRAHMASAMUDRA Reviewed-by: Prem Shanker Jha Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46030 Reviewed-by: Hostboot Team Reviewed-by: Sachin Gupta --- src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.C | 11 ++++++++++- src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.H | 1 + 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'src/import/chips') diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.C b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.C index 66e77022..8cad338c 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.C @@ -666,7 +666,7 @@ fapi2::ReturnCode pm_ocb_reset( // hardware procedures. FAPI_TRY(fapi2::getScom(i_target, PU_PBAMODE_SCOM, l_buf64), "**** ERROR : Failed to fetch PBA mode control status"); - l_buf64.clearBit<8>(); + l_buf64.clearBit(); FAPI_TRY(fapi2::putScom(i_target, PU_PBAMODE_SCOM, l_buf64), "**** ERROR : Failed to write PBA mode control"); @@ -674,6 +674,15 @@ fapi2::ReturnCode pm_ocb_reset( FAPI_TRY(fapi2::putScom(i_target, PU_OCB_PIB_OSTOESR, 0), "**** ERROR : Failed to write OSTESR"); + // Explicitly disable the OCC Heartbeat (RTC: 172638) + // Only clearing the OCB_OCI_OCCHBR_OCC_HEARTBEAT_EN and leaving the + // Heartbeat count intact as this may prove useful for debug later. + FAPI_TRY(fapi2::getScom(i_target, PU_OCB_OCI_OCCHBR_SCOM, l_buf64), + "**** ERROR : Failed to read OCBHBR"); + l_buf64.clearBit(); + FAPI_TRY(fapi2::putScom(i_target, PU_OCB_OCI_OCCHBR_SCOM, l_buf64), + "**** ERROR : Failed to write OCBHBR"); + fapi_try_exit: return fapi2::current_err; } diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.H b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.H index fb181014..a6959914 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.H +++ b/src/import/chips/p9/procedures/hwp/pm/p9_pm_ocb_init.H @@ -43,6 +43,7 @@ #include #include #include +#include //------------------------------------------------------------------------------ // Constants definitions -- cgit v1.2.1