summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2019-05-15 10:48:59 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-05-31 09:44:20 -0500
commit3d09e6cb299bf09346174faf1444480967f44156 (patch)
tree5d6afee34f6a86bf30ff8783b7ebb81a93c0cf55
parentf38ca7d5412ba8fb077403d043889a64ff97cff9 (diff)
downloadtalos-hostboot-3d09e6cb299bf09346174faf1444480967f44156.tar.gz
talos-hostboot-3d09e6cb299bf09346174faf1444480967f44156.zip
Integrate pmic_enable HWP into IPL
Add pmic_enable to istep 8.12 host_set_voltages. Change-Id: I67079281fd72c2c651db069479882dd7c9e4587c RTC:209259 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77402 Reviewed-by: Glenn Miles <milesg@ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
-rw-r--r--src/include/usr/isteps/istep08list.H5
-rw-r--r--src/usr/i2c/fapi_i2c_dd.C15
-rw-r--r--src/usr/isteps/istep08/call_host_set_voltages.C42
-rw-r--r--src/usr/isteps/istep08/makefile23
4 files changed, 76 insertions, 9 deletions
diff --git a/src/include/usr/isteps/istep08list.H b/src/include/usr/isteps/istep08list.H
index 6ee38287c..5820907f9 100644
--- a/src/include/usr/isteps/istep08list.H
+++ b/src/include/usr/isteps/istep08list.H
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2018 */
+/* Contributors Listed Below - COPYRIGHT 2012,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -267,6 +267,9 @@ const DepModInfo g_istep08Dependancies = {
DEP_LIB(libisteps_nest.so),
DEP_LIB(libsbe.so),
DEP_LIB(libimageprocs.so),
+#ifdef CONFIG_AXONE
+ DEP_LIB(libisteps_mss.so),
+#endif
NULL
}
};
diff --git a/src/usr/i2c/fapi_i2c_dd.C b/src/usr/i2c/fapi_i2c_dd.C
index bf1771865..d800af376 100644
--- a/src/usr/i2c/fapi_i2c_dd.C
+++ b/src/usr/i2c/fapi_i2c_dd.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2018 */
+/* Contributors Listed Below - COPYRIGHT 2018,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -69,6 +69,11 @@ DEVICE_REGISTER_ROUTE( DeviceFW::WILDCARD,
TARGETING::TYPE_OCMB_CHIP,
fapiI2cPerformOp );
+DEVICE_REGISTER_ROUTE( DeviceFW::WILDCARD,
+ DeviceFW::FAPI_I2C,
+ TARGETING::TYPE_PMIC,
+ fapiI2cPerformOp );
+
errlHndl_t fapiI2cPerformOp(DeviceFW::OperationType i_opType,
TARGETING::Target * i_target,
void * io_buffer,
@@ -376,10 +381,10 @@ errlHndl_t i2cWrite( TARGETING::Target * i_target,
i_buffer,
io_buffer_size,
DEVICE_I2C_ADDRESS(i_i2cInfo->port,
- i_i2cInfo->engine,
- i_i2cInfo->devAddr,
- i_i2cInfo->i2cMuxBusSelector,
- &(i_i2cInfo->i2cMuxPath) ) );
+ i_i2cInfo->engine,
+ i_i2cInfo->devAddr,
+ i_i2cInfo->i2cMuxBusSelector,
+ &(i_i2cInfo->i2cMuxPath) ) );
if( l_err )
{
diff --git a/src/usr/isteps/istep08/call_host_set_voltages.C b/src/usr/isteps/istep08/call_host_set_voltages.C
index 11c37a50d..dff6a6424 100644
--- a/src/usr/isteps/istep08/call_host_set_voltages.C
+++ b/src/usr/isteps/istep08/call_host_set_voltages.C
@@ -46,7 +46,10 @@
#include <p9_setup_evid.H>
#include <nest/nestHwpHelperFuncs.H> // fapiHWPCallWrapperForChip
#include <hbToHwsvVoltageMsg.H> // platform_set_nest_voltages
-
+#ifdef CONFIG_AXONE
+#include <chipids.H> // for EXPLORER ID
+#include <pmic_enable.H>
+#endif
// Init Service support
#include <initservice/initserviceif.H> // INITSERVICE::spBaseServicesEnabled
@@ -156,8 +159,43 @@ void* call_host_set_voltages(void *io_pArgs)
fapiHWPCallWrapperHandler(P9_IO_XBUS_IMAGE_BUILD, l_stepError,
HWPF_COMP_ID, TYPE_PROC);
}
- }while( 0 );
+#ifdef CONFIG_AXONE
+ // Create a vector of TARGETING::Target pointers
+ TargetHandleList l_chipList;
+
+ // Get a list of all of the functioning ocmb chips
+ TARGETING::getAllChips(l_chipList, TARGETING::TYPE_OCMB_CHIP, true);
+
+ for (const auto & l_ocmb: l_chipList)
+ {
+ // PMICs are not present on Gemini, so skip this enable call
+ // check EXPLORER first as this is most likely the configuration
+ uint32_t chipId = l_ocmb->getAttr< TARGETING::ATTR_CHIP_ID>();
+ if (chipId == POWER_CHIPID::EXPLORER_16)
+ {
+ TRACFCOMP( g_trac_isteps_trace, "call_host_set_voltages: "
+ "calling pmic_enable on OCMB 0x%.8X", get_huid(l_ocmb) );
+
+ fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>l_fapi2_target(l_ocmb);
+
+ // Invoke procedure
+ FAPI_INVOKE_HWP(l_err, pmic_enable, l_fapi2_target);
+ }
+
+ if (l_err)
+ {
+ TRACFCOMP(g_trac_isteps_trace,
+ "Error from pmic_enable for 0x%.8X target",
+ TARGETING::get_huid(l_ocmb));
+
+ // Capture error and continue to next OCMB
+ captureError(l_err, l_stepError, HWPF_COMP_ID, l_ocmb);
+ }
+ }
+#endif
+
+ }while( 0 );
TRACFCOMP(g_trac_isteps_trace, EXIT_MRK"call_host_set_voltages exit");
diff --git a/src/usr/isteps/istep08/makefile b/src/usr/isteps/istep08/makefile
index 225e07735..5b1da4f21 100644
--- a/src/usr/isteps/istep08/makefile
+++ b/src/usr/isteps/istep08/makefile
@@ -5,7 +5,7 @@
#
# OpenPOWER HostBoot Project
#
-# Contributors Listed Below - COPYRIGHT 2015,2018
+# Contributors Listed Below - COPYRIGHT 2015,2019
# [+] International Business Machines Corp.
#
#
@@ -24,6 +24,10 @@
# IBM_PROLOG_END_TAG
ROOTPATH = ../../../..
PROCEDURES_PATH = ${ROOTPATH}/src/import/chips/p9/procedures
+
+# OCMB path
+COMMON_PATH_OCMB += ${ROOTPATH}/src/import/chips/ocmb/common
+
MODULE = istep08
EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/pm/
@@ -38,10 +42,18 @@ EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/common/include/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/utils/imageProcs/
+EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/
EXTRAINCDIR += ${ROOTPATH}/src/import/chips/common/utils/imageProcs/
EXTRAINCDIR += ${ROOTPATH}/src/usr/isteps/
EXTRAINCDIR += ${ROOTPATH}/src/usr/sbeio/
EXTRAINCDIR += ${PROCEDURES_PATH}/hwp/pm/include/registers
+EXTRAINCDIR += ${COMMON_PATH_OCMB}/procedures/hwp/pmic/
+EXTRAINCDIR += ${COMMON_PATH_OCMB}/procedures/hwp/pmic/lib/utils/
+EXTRAINCDIR += ${COMMON_PATH_OCMB}/include/
+EXTRAINCDIR += ${ROOTPATH}/src/import/
+EXTRAINCDIR += ${ROOTPATH}/obj/genfiles/chips/ocmb/common/procedures/hwp/pmic/lib/
+EXTRAINCDIR += ${ROOTPATH}/obj/genfiles/generic/memory/lib/
+
OBJS += call_host_slave_sbe_config.o
OBJS += call_host_setup_sbe.o
@@ -61,6 +73,10 @@ VPATH += ${PROCEDURES_PATH}/hwp/io/ ${PROCEDURES_PATH}/hwp/initfiles/
VPATH += ${PROCEDURES_PATH}/hwp/sbe/
VPATH += ${PROCEDURES_PATH}/hwp/pm/
VPATH += ${PROCEDURES_PATH}/hwp/lib
+VPATH += ${COMMON_PATH_OCMB}/pmic/
+VPATH += ${COMMON_PATH_OCMB}/procedures/hwp/pmic/
+VPATH += ${COMMON_PATH_OCMB}/procedures/hwp/pmic/lib/utils/
+VPATH += ${COMMON_PATH_OCMB}/include/
include ${ROOTPATH}/procedure.rules.mk
@@ -110,4 +126,9 @@ MODULE = istep08
# Take another look at PM lib
include $(PROCEDURES_PATH)/hwp/pm/p9_pm_utils.mk
+# Axone only objects
+OBJS += $(if $(CONFIG_AXONE),pmic_common_utils.o,)
+OBJS += $(if $(CONFIG_AXONE),pmic_enable_utils.o,)
+OBJS += $(if $(CONFIG_AXONE),pmic_enable.o,)
+
include ${ROOTPATH}/config.mk
OpenPOWER on IntegriCloud