summaryrefslogtreecommitdiffstats
path: root/src/import/chips
diff options
context:
space:
mode:
authorSumit Kumar <sumit_kumar@in.ibm.com>2016-07-04 04:51:27 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2016-10-13 12:53:47 -0400
commit297fed2057c20efdd3872446939c7805fe069c15 (patch)
tree0c4f312c3a5b69785374adf98b1ce9a7f41c033f /src/import/chips
parent65d24fe5887de131b93117955929341581eba3ce (diff)
downloadtalos-sbe-297fed2057c20efdd3872446939c7805fe069c15.tar.gz
talos-sbe-297fed2057c20efdd3872446939c7805fe069c15.zip
L2 HWP p9_quad_power_off
Change-Id: I97532790ca5d84d98ed883fd43fc4cc5783f7239 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26596 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Sangeetha T S <sangeet2@in.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/31154 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips')
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.C58
-rw-r--r--src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.H45
2 files changed, 55 insertions, 48 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 a2e84a87..e5bd8117 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
@@ -24,43 +24,55 @@
/* IBM_PROLOG_END_TAG */
///
/// @file p9_quad_power_off.C
-/// @brief Power off the EQ -- including the functional cores associatated
-/// with it.
-///
-// *HWP HWP Owner: Amit Kumar <akumar3@us.ibm.com>
-// *HWP HWP Backup Owner: Greg Still <stillgs@us.ibm.com>
-// *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com>
-// *HWP Team: PM
-// *HWP Level: 1
-// *HWP Consumed by: FSP:HS
-///
-/// @verbatim
-/// High-level procedure flow:
-/// - for each good EC associated with the targeted EQ, power it off
-/// - power off the EQ
-/// @endverbatim
+/// @brief Power off the EQ including the functional cores associatated with it.
///
+//----------------------------------------------------------------------------
+// *HWP HWP Owner : Greg Still <stillgs@us.ibm.com>
+// *HWP FW Owner : Sumit Kumar <sumit_kumar@in.ibm.com>
+// *HWP Team : PM
+// *HWP Level : 2
+// *HWP Consumed by : OCC:CME:FSP
+//----------------------------------------------------------------------------
+//
+// @verbatim
+// High-level procedure flow:
+// - For each good EC associated with the targeted EQ, power it off.
+// - Power off the EQ.
+// @endverbatim
+//
//------------------------------------------------------------------------------
// ----------------------------------------------------------------------
// Includes
// ----------------------------------------------------------------------
-
#include <p9_quad_power_off.H>
// ----------------------------------------------------------------------
-// Procedure Function
+// Function definitions
// ----------------------------------------------------------------------
-fapi2::ReturnCode
-p9_quad_power_off(
- const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_eq_target)
+// Procedure p9_quad_power_off entry point, comments in header
+fapi2::ReturnCode p9_quad_power_off(
+ const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target)
{
- FAPI_INF("> p9_quad_power_off...");
+ fapi2::ReturnCode rc = fapi2::FAPI2_RC_SUCCESS;
+ uint8_t l_unit_pos = 0;
+
+ FAPI_INF("p9_quad_power_off: Entering...");
+
+ // Get chiplet position
+ FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_CHIP_UNIT_POS, i_target, l_unit_pos));
+ FAPI_INF("Quad power off chiplet no.%d", l_unit_pos);
+
+ // Call the procedure
+ p9_pm_pfet_control_eq(i_target,
+ PM_PFET_TYPE_C::BOTH,
+ PM_PFET_TYPE_C::OFF);
+
+ FAPI_INF("p9_quad_power_off: ...Exiting");
-//fapi_try_exit:
- FAPI_INF("< p9_quad_power_off...");
+fapi_try_exit:
return fapi2::current_err;
}
diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.H b/src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.H
index 8b58a946..05a8a62c 100644
--- a/src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.H
+++ b/src/import/chips/p9/procedures/hwp/pm/p9_quad_power_off.H
@@ -22,19 +22,17 @@
/* permissions and limitations under the License. */
/* */
/* IBM_PROLOG_END_TAG */
-
-/// @file p9_block_wakeup_intr.H
-/// @brief Set/reset the BLOCK_REG_WKUP_SOURCES bit in the PPM
-/// associated with an EX chiplet
///
-// *HWP HWP Owner: Amit Kumar <akumar3@us.ibm.com>
-// *HWP Backup HWP Owner: Greg Still <stillgs@us.ibm.com>
-// *HWP FW Owner: Sangeetha T S <sangeet2@in.ibm.com>
-// *HWP Team: PM
-// *HWP Level: 1
-// *HWP Consumed by: FSP:HS
+/// @file p9_quad_power_off.H
+/// @brief Power off the EQ including the functional cores associatated with it.
///
-///-----------------------------------------------------------------------------
+//----------------------------------------------------------------------------
+// *HWP HWP Owner : Greg Still <stillgs@us.ibm.com>
+// *HWP FW Owner : Sumit Kumar <sumit_kumar@in.ibm.com>
+// *HWP Team : PM
+// *HWP Level : 2
+// *HWP Consumed by : OCC:CME:FSP
+//----------------------------------------------------------------------------
#ifndef _P9_QUADPOWEROFF_H_
#define _P9_QUADPOWEROFF_H_
@@ -42,10 +40,9 @@
//------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------
-
#include <fapi2.H>
#include <p9_quad_scom_addresses.H>
-#include <p9_quad_scom_addresses_fld.H>
+#include <p9_pm_pfet_control.H>
//------------------------------------------------------------------------------
// Constant definitions
@@ -53,7 +50,7 @@
// function pointer typedef definition for HWP call support
typedef fapi2::ReturnCode (*p9_quad_power_off_FP_t) (
- const fapi2::Target<fapi2::TARGET_TYPE_EQ>&);
+ const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target);
extern "C"
{
@@ -61,17 +58,15 @@ extern "C"
//------------------------------------------------------------------------------
// Function prototype
//------------------------------------------------------------------------------
-
-/// @brief Power off the EQ -- including the functional cores associatated
-/// with it.
-///
-/// @param[in] i_eq_target EQ target
-///
-/// @return FAPI2_RC_SUCCESS if success, else error code.
-
- fapi2::ReturnCode
- p9_quad_power_off(
- const fapi2::Target<fapi2::TARGET_TYPE_CORE>& i_core_target);
+ /**
+ ** @brief Power off the EQ including the functional cores associatated with it.
+ **
+ ** @param[in] i_target Targe type EQ
+ **
+ ** @return FAPI2_RC_SUCCESS if success, error otherwise
+ **/
+ fapi2::ReturnCode p9_quad_power_off (
+ const fapi2::Target<fapi2::TARGET_TYPE_EQ>& i_target);
} // extern "C"
OpenPOWER on IntegriCloud