Skip to content

Commit

Permalink
L3 update -- p9_throttle_sync
Browse files Browse the repository at this point in the history
  - Update headers/comments
  - Review code and error files

Change-Id: Ic3884c1cfe5fc8537274ad21c2a1955161a475c5
RTC:139552
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41476
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com>
Reviewed-by: Benjamin Gass <bgass@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41477
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
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>
  • Loading branch information
ibmthi authored and dcrowell77 committed Jun 20, 2017
1 parent 578f09c commit 5c5ed8c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
20 changes: 9 additions & 11 deletions src/import/chips/p9/procedures/hwp/nest/p9_throttle_sync.C
Expand Up @@ -23,7 +23,7 @@
/* */
/* IBM_PROLOG_END_TAG */
/// ----------------------------------------------------------------------------
/// @file p9_throttle_sync.H
/// @file p9_throttle_sync.C
///
/// @brief Perform p9_throttle_sync HWP
///
Expand All @@ -34,7 +34,7 @@
/// *HWP HWP Owner : Joe McGill <jmcgill@us.ibm.com>
/// *HWP FW Owner : Thi Tran <thi@us.ibm.com>
/// *HWP Team : Nest
/// *HWP Level : 2
/// *HWP Level : 3
/// *HWP Consumed by : HB
/// ----------------------------------------------------------------------------

Expand All @@ -59,9 +59,7 @@ template <fapi2::TargetType T>
struct mcSideInfo_t
{
bool masterMcFound = false;

// Master MC for this MC side
fapi2::Target<T> masterMc;
fapi2::Target<T> masterMc; // Master MC for this MC side
};

///
Expand All @@ -75,6 +73,7 @@ struct mcSideInfo_t
template< fapi2::TargetType T>
uint8_t findNumDimms(const fapi2::Target<T>& i_mcTarget);

// TARGET_TYPE_MI
template<>
uint8_t findNumDimms(const fapi2::Target<fapi2::TARGET_TYPE_MI>& i_miTarget)
{
Expand All @@ -97,6 +96,7 @@ uint8_t findNumDimms(const fapi2::Target<fapi2::TARGET_TYPE_MI>& i_miTarget)
return l_num_dimms;
}

// TARGET_TYPE_MCS
template<>
uint8_t findNumDimms(const fapi2::Target<fapi2::TARGET_TYPE_MCS>& i_mcsTarget)
{
Expand Down Expand Up @@ -154,7 +154,6 @@ fapi2::ReturnCode progMCMODE0(
// Determine side functionality
for (auto l_mc : i_mcTargets)
{

uint8_t l_tmp_pos = 0;
FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, l_mc,
l_tmp_pos),
Expand All @@ -167,7 +166,7 @@ fapi2::ReturnCode progMCMODE0(
l_other_side_functional = true;
}

// the same side
// The same side
if (l_tmp_pos == l_same_side_pos)
{
l_same_side_functional = true;
Expand All @@ -194,7 +193,7 @@ fapi2::ReturnCode progMCMODE0(

FAPI_TRY(fapi2::putScomUnderMask(i_mcTarget, MCS_MCMODE0,
l_scomData, l_scomMask),
"putScomUnderMask() returns an error (Mode0), MCS_MCMODE0 reg 0x%.16llX",
"putScomUnderMask() returns an error, MCS_MCMODE0 reg 0x%.16llX",
MCS_MCMODE0);

fapi_try_exit:
Expand All @@ -212,8 +211,7 @@ fapi_try_exit:
/// @return FAPI2_RC_SUCCESS if success, else error code.
///
template< fapi2::TargetType T>
fapi2::ReturnCode progMaster(
const fapi2::Target<T>& i_mcTarget)
fapi2::ReturnCode progMaster(const fapi2::Target<T>& i_mcTarget)
{
FAPI_DBG("Entering progMaster");
fapi2::ReturnCode l_rc;
Expand Down Expand Up @@ -242,7 +240,7 @@ fapi2::ReturnCode progMaster(
l_scomData.flush<0>();
FAPI_TRY(fapi2::putScomUnderMask(i_mcTarget, MCS_MCSYNC,
l_scomData, l_scomMask),
"putScomUnderMask() returns an error (Sync reset), Addr 0x%.16llX",
"putScomUnderMask() returns an error (Reset), MCS_MCSYNC reg 0x%.16llX",
MCS_MCSYNC);

// --------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions src/import/chips/p9/procedures/hwp/nest/p9_throttle_sync.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2015,2016 */
/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -34,7 +34,7 @@
/// *HWP HWP Owner : Joe McGill <jmcgill@us.ibm.com>
/// *HWP FW Owner : Thi Tran <thi@us.ibm.com>
/// *HWP Team : Nest
/// *HWP Level : 2
/// *HWP Level : 3
/// *HWP Consumed by : HB
/// ----------------------------------------------------------------------------
#ifndef _P9_THROTTLE_SYNC_H_
Expand Down

0 comments on commit 5c5ed8c

Please sign in to comment.