From fcecddd101106826ad916ce91b5dd79ede53cd0b Mon Sep 17 00:00:00 2001 From: Christian Geddes Date: Fri, 29 Sep 2017 13:43:25 -0500 Subject: Remove functionality from tp enable ridi and move it to nest enabled ridi Previously, we were enabled TP RIDI before we did a bunch of scans which touch LPC logic. This was causing LPC logic to get messed up because once TP ridi is enabled LPC traffic is flowing. To get around this, we are moving the enablement of the TP RIDI to after the scans of the LPC logic so that the LPC logic wont get messed with Change-Id: I6244fdf1314a21d9c76519bde3905287c7870b26 CQ: SW396004 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46941 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: PPE CI Reviewed-by: Dean Sanner Reviewed-by: Joseph J. McGill Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46966 Reviewed-by: Sachin Gupta --- .../procedures/hwp/perv/p9_sbe_nest_enable_ridi.C | 40 ++++++++++++++++++++-- .../p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.C | 25 +++----------- .../p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.H | 8 +++-- 3 files changed, 47 insertions(+), 26 deletions(-) (limited to 'src/import/chips/p9/procedures/hwp/perv') diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_nest_enable_ridi.C b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_nest_enable_ridi.C index 97c26c64..987fc98a 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_nest_enable_ridi.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_nest_enable_ridi.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -40,10 +40,14 @@ #include "p9_sbe_nest_enable_ridi.H" #include "p9_perv_scom_addresses.H" +#include "p9_perv_scom_addresses_fld.H" static fapi2::ReturnCode p9_sbe_nest_enable_ridi_net_ctrl_action_function( const fapi2::Target& i_target_chiplet); +static fapi2::ReturnCode tp_enable_ridi(const + fapi2::Target& i_target_chip); + fapi2::ReturnCode p9_sbe_nest_enable_ridi(const fapi2::Target& i_target_chip) { @@ -51,6 +55,14 @@ fapi2::ReturnCode p9_sbe_nest_enable_ridi(const i_target_chip.getChildren (fapi2::TARGET_STATE_FUNCTIONAL); FAPI_DBG("p9_sbe_nest_enable_ridi: Entering ..."); + FAPI_DBG("p9_sbe_nest_enable_ridi: Enabling TP RI/DI ..."); + //First enable the TP ri/di, originally they were enabled in + //a previous istep, but running the steps in that order + //was allowing LPC traffic to flow while the LPC logic was scanned + FAPI_TRY(tp_enable_ridi(i_target_chip)); + FAPI_DBG("p9_sbe_nest_enable_ridi: Enabling TP RI/DI Complete ..."); + + FAPI_DBG("p9_sbe_nest_enable_ridi: Enabling nest RI/DI ..."); for (auto& l_chplt_trgt : l_perv_functional_vector) { @@ -71,6 +83,7 @@ fapi2::ReturnCode p9_sbe_nest_enable_ridi(const FAPI_TRY(p9_sbe_nest_enable_ridi_net_ctrl_action_function(l_chplt_trgt)); } + FAPI_DBG("p9_sbe_nest_enable_ridi: Enabling nest RI/DI Complete ..."); FAPI_DBG("p9_sbe_nest_enable_ridi: Exiting ..."); fapi_try_exit: @@ -78,6 +91,30 @@ fapi_try_exit: } +/// @brief enables TP ridi bits in RC regs +/// +/// @param[in] i_target_chip Reference to TARGET_TYPE_PROC_CHIP target +/// @return FAPI2_RC_SUCCESS if success, else error code. +static fapi2::ReturnCode tp_enable_ridi(const + fapi2::Target& i_target_chip) +{ + fapi2::buffer l_data64; + FAPI_DBG("tp_enable_ridi: Entering ..."); + + FAPI_INF("tp_enable_ridi:: Enable Recievers, Drivers DI1 & DI2"); + //Setting ROOT_CTRL1 register value + FAPI_TRY(fapi2::getScom(i_target_chip, PERV_ROOT_CTRL1_SCOM, l_data64)); + l_data64.setBit(); // 19 + l_data64.setBit(); // 20 + l_data64.setBit(); // 21 + FAPI_TRY(fapi2::putScom(i_target_chip, PERV_ROOT_CTRL1_SCOM, l_data64)); + + FAPI_DBG("tp_enable_ridi: Exiting ..."); + +fapi_try_exit: + return fapi2::current_err; +} + /// @brief Enable Drivers/Recievers of Nest chiplet /// /// @param[in] i_target_chiplet Reference to TARGET_TYPE_PERV target @@ -109,5 +146,4 @@ static fapi2::ReturnCode p9_sbe_nest_enable_ridi_net_ctrl_action_function( fapi_try_exit: return fapi2::current_err; - } diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.C b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.C index 35965324..ac2babc7 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -25,7 +25,8 @@ //------------------------------------------------------------------------------ /// @file p9_sbe_tp_enable_ridi.C /// -/// @brief enables ridi bits in RC regs after scan initialize and start clock the pervasive chiplet +/// @brief This is a method stub, the real functionality has been moved to +/// p9_sbe_nest_enable_ridi.C //------------------------------------------------------------------------------ // *HWP HW Owner : Abhishek Agarwal // *HWP HW Backup Owner : Srinivas V Naga @@ -35,30 +36,12 @@ // *HWP Consumed by : SBE //------------------------------------------------------------------------------ - //## auto_generated #include "p9_sbe_tp_enable_ridi.H" -#include "p9_perv_scom_addresses.H" - - fapi2::ReturnCode p9_sbe_tp_enable_ridi(const fapi2::Target& i_target_chip) { - fapi2::buffer l_data64; - FAPI_DBG("p9_sbe_tp_enable_ridi: Entering ..."); - - FAPI_INF("Enable Recievers, Drivers DI1 & DI2"); - //Setting ROOT_CTRL1 register value - FAPI_TRY(fapi2::getScom(i_target_chip, PERV_ROOT_CTRL1_SCOM, l_data64)); - l_data64.setBit<19>(); //PIB.ROOT_CTRL1.TP_RI_DC_B = 1 - l_data64.setBit<20>(); //PIB.ROOT_CTRL1.TP_DI1_DC_B = 1 - l_data64.setBit<21>(); //PIB.ROOT_CTRL1.TP_DI2_DC_B = 1 - FAPI_TRY(fapi2::putScom(i_target_chip, PERV_ROOT_CTRL1_SCOM, l_data64)); - - FAPI_DBG("p9_sbe_tp_enable_ridi: Exiting ..."); - -fapi_try_exit: + // This function is now a stub, functionality has been moved to p9_sbe_nest_enable_ridi.C return fapi2::current_err; - } diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.H b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.H index 908bf804..3dff0960 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.H +++ b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_tp_enable_ridi.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -25,7 +25,8 @@ //------------------------------------------------------------------------------ /// @file p9_sbe_tp_enable_ridi.H /// -/// @brief enables ridi bits in RC regs after scan initialize and start clock the pervasive chiplet +/// @brief This is a method stub, the real functionality has been moved to +/// p9_sbe_nest_enable_ridi.C //------------------------------------------------------------------------------ // *HWP HW Owner : Abhishek Agarwal // *HWP HW Backup Owner : Srinivas V Naga @@ -46,7 +47,8 @@ typedef fapi2::ReturnCode (*p9_sbe_tp_enable_ridi_FP_t)( const fapi2::Target&); -/// @brief Enable drivers/receivers for PRV chiplet +/// @brief This is a method stub, the real functionality has been moved to +/// p9_sbe_nest_enable_ridi.C /// /// @param[in] i_target_chip Reference to TARGET_TYPE_PROC_CHIP target /// @return FAPI2_RC_SUCCESS if success, else error code. -- cgit v1.2.1