summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRaja Das <rajadas2@in.ibm.com>2017-01-27 03:28:05 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-02-10 21:55:28 -0500
commit68134ad6a5854365740bb0fd39b8b822d6eddae4 (patch)
treeb64fef56cd28c61b3f5c2d93962a0af600073e8a /src
parent3e26f356fe1f5603f4bab9e42dfc4cb402ea0e94 (diff)
downloadtalos-hostboot-68134ad6a5854365740bb0fd39b8b822d6eddae4.tar.gz
talos-hostboot-68134ad6a5854365740bb0fd39b8b822d6eddae4.zip
Added Scom to de-assert EDRAM Charge Pumps in Power down sequence
Change-Id: I61c929efe02438418bab436d9332ffcb4233b001 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35501 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: YUE DU <daviddu@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35503 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.C23
1 files changed, 20 insertions, 3 deletions
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.C b/src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.C
index e80da3503..da0e4e337 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.C
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.C
@@ -57,21 +57,38 @@ fapi2::ReturnCode p9_quad_power_off(
const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target)
{
fapi2::buffer<uint64_t> l_data64;
+ constexpr uint64_t l_rawData = 0x1100000000000000ULL; // Bit 3 & 7 are set to be manipulated
+ constexpr uint32_t MAX_CORE_PER_QUAD = 4;
fapi2::ReturnCode rc = fapi2::FAPI2_RC_SUCCESS;
+ uint32_t l_cnt = 0;
FAPI_INF("p9_quad_power_off: Entering...");
// Print chiplet position
FAPI_INF("Quad power off chiplet no.%d", i_target.getChipletNumber());
+ FAPI_DBG("Disabling bits 20/22/24/26 in EQ_QPPM_QPMMR_CLEAR, to gain access"
+ " to PFET controller, otherwise Quad Power off scom will fail");
l_data64.setBit<20>();
l_data64.setBit<22>();
l_data64.setBit<24>();
l_data64.setBit<26>();
+ FAPI_TRY(fapi2::putScom(i_target, EQ_QPPM_QPMMR_CLEAR, l_data64));
+
+ // QPPM_QUAD_CTRL_REG
+ do
+ {
+ // EX0, Enables the EDRAM charge pumps in L3 EX0, on power down they
+ // must be de-asserted in the opposite order 3 -> 0
+ // EX1, Enables the EDRAM charge pumps in L3 EX1, on power down they
+ // must be de-asserted in the opposite order 7 -> 4
+ FAPI_DBG("De-asserting EDRAM charge pumps in Ex0 & Ex1 in Sequence for "
+ "Reg EQ_QPPM_QCCR_SCOM1, Data Value [0x%0X%0X]",
+ uint32_t((l_rawData << l_cnt) >> 32), uint32_t(l_rawData << l_cnt));
+ FAPI_TRY(fapi2::putScom(i_target, EQ_QPPM_QCCR_SCOM1, (l_rawData << l_cnt)));
+ }
+ while(++l_cnt < MAX_CORE_PER_QUAD);
- FAPI_TRY(fapi2::putScom(i_target,
- EQ_QPPM_QPMMR_CLEAR,
- l_data64));
// Call the procedure
FAPI_EXEC_HWP(rc, p9_pm_pfet_control_eq, i_target,
PM_PFET_TYPE_C::BOTH, PM_PFET_TYPE_C::OFF);
OpenPOWER on IntegriCloud