From caa8eda59c2c9adfdf42285cec38eae64f560916 Mon Sep 17 00:00:00 2001 From: Christian Geddes Date: Tue, 18 Dec 2018 15:59:07 -0600 Subject: Add presence detection for i2c mux targets This commit removes the ddimm.C file that had the deviceFramework routing for OCMB presence detection and replaces it with a new file in src/usr/i2c/i2cTargetPres.C that is more generic for any target that has the FAPI_I2C_CONTROLLER_INFO attribute. The i2c_mux target also now uses this same code for its presence detection. As a result of this change the src/usr/i2c/mux_i2c.* files have also been removed. When getting rid of the ddimm.C file I had to put the IDEC device routing somewhere else so I moved it to the hwasPlat code where the other IDEC device routes are registered. RTC: 196805 Change-Id: I27e5e3e8d0fe107c3d44a450e20efa6f50fa0c5f Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/69944 Reviewed-by: Matt Derksen Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Roland Veloz Reviewed-by: Daniel M. Crowell --- src/usr/hwas/common/hwas.C | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/usr/hwas/common') diff --git a/src/usr/hwas/common/hwas.C b/src/usr/hwas/common/hwas.C index d8530ad98..2cb7e9491 100644 --- a/src/usr/hwas/common/hwas.C +++ b/src/usr/hwas/common/hwas.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2018 */ +/* Contributors Listed Below - COPYRIGHT 2012,2019 */ /* [+] Google Inc. */ /* [+] International Business Machines Corp. */ /* */ @@ -701,9 +701,12 @@ errlHndl_t discoverTargets() PredicateCTM predChip(CLASS_CHIP); PredicateCTM predDimm(CLASS_LOGICAL_CARD, TYPE_DIMM); PredicateCTM predMcs(CLASS_UNIT, TYPE_MCS); + // We can ignore chips of TYPE_I2C_MUX because they + // were already detected above in discoverMuxTargetsAndEnable + PredicateCTM predMux(CLASS_CHIP, TYPE_I2C_MUX); PredicatePostfixExpr checkExpr; checkExpr.push(&predChip).push(&predDimm).Or().push(&predEnc).Or(). - push(&predMcs).Or(); + push(&predMcs).Or().push(&predMux).Not().And(); TargetHandleList pCheckPres; targetService().getAssociated( pCheckPres, pSys, @@ -764,8 +767,7 @@ errlHndl_t discoverTargets() if( (pTarget->getAttr() == CLASS_CHIP) && (l_targetType != TYPE_TPM) && (l_targetType != TYPE_SP) && - (l_targetType != TYPE_BMC) && - (l_targetType != TYPE_I2C_MUX) ) + (l_targetType != TYPE_BMC) ) { // read Chip ID/EC data from these physical chips errl = platReadIDEC(pTarget); -- cgit v1.2.1