Skip to content

Commit

Permalink
p9_sbe_npll_setup: Enable spread spectrum before starting PLL
Browse files Browse the repository at this point in the history
There's a synchronizer missing on the sscgen input of the filter
PLLs, thus any changes to that input must be made before the PLL
is taken out of reset, or the spread generator inside the PLL might
start up in a skewed state, resulting in a broken spread profile.

Thus, change the procedure to enable spread before taking the PLL
out of reset, and also make sure we never try to synchronously
enable spread.

Change-Id: Ie0e545a6baf492d394a7d63d99ba5b83a0c46423
CQ: SW457204
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71886
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+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: Kevin F. Reick <reick@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71912
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
  • Loading branch information
fenkes-ibm authored and RAJA DAS committed Feb 25, 2019
1 parent 1d73131 commit e8590a9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 20 deletions.
26 changes: 8 additions & 18 deletions src/import/chips/p9/procedures/hwp/perv/p9_sbe_npll_setup.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2018 */
/* Contributors Listed Below - COPYRIGHT 2015,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -91,6 +91,13 @@ fapi2::ReturnCode p9_sbe_npll_setup(const

if (l_attr_ss_filter == 0x0 )
{
/*
* If we enable spread spectrum, do it before we drop the PLL reset
* to avoid glitches due to the asynchronous crossing of the control
* signal into the PLL core.
*/
FAPI_TRY(enable_spread_spectrum_via_tod(i_target_chip));

FAPI_DBG("Drop PLL test enable for Spread Spectrum PLL");
//Setting ROOT_CTRL8 register value
//PIB.ROOT_CTRL8.TP_SS0_PLL_TEST_EN = 0
Expand Down Expand Up @@ -119,8 +126,6 @@ fapi2::ReturnCode p9_sbe_npll_setup(const
.set_AFTER_SPREAD_ENABLE(false),
"ERROR:SS PLL LOCK NOT SET");

FAPI_TRY(enable_spread_spectrum_via_tod(i_target_chip));

FAPI_DBG("Release SS PLL Bypass");
//Setting ROOT_CTRL8 register value
//PIB.ROOT_CTRL8.TP_SS0_PLL_BYPASS = 0
Expand Down Expand Up @@ -393,21 +398,6 @@ static fapi2::ReturnCode enable_spread_spectrum_via_tod(
.set_TOD_TIMER_REG(l_data),
"Spread Spectrum enable signal not set");

fapi2::delay(NS_DELAY, SIM_CYCLE_DELAY);

FAPI_DBG("check SS PLL lock again after enabling spread spectrum");
//Getting PLL_LOCK_REG register value
FAPI_TRY(fapi2::getScom(i_target_chip,
PERV_TP_PLL_LOCK_REG,
l_data));

FAPI_ASSERT(l_data.getBit<0>(),
fapi2::SS_PLL_LOCK_ERR()
.set_MASTER_CHIP(i_target_chip)
.set_SS_PLL_READ(l_data)
.set_AFTER_SPREAD_ENABLE(true),
"ERROR:SS PLL LOCK NOT SET AFTER ENABLING SPREAD SPECTRUM");

fapi_try_exit:
return fapi2::current_err;
}
Original file line number Diff line number Diff line change
Expand Up @@ -8577,8 +8577,9 @@
<chip>
<name>ENUM_ATTR_NAME_AXONE</name>
<ec>
<value>0x10</value>
<test>GREATER_THAN_OR_EQUAL</test>
<!-- essentially... never, since synchronous spread start is broken -->
<value>0xAF</value>
<test>EQUAL</test>
</ec>
</chip>
</chipEcFeature>
Expand Down

0 comments on commit e8590a9

Please sign in to comment.