summaryrefslogtreecommitdiffstats
path: root/src/usr/targeting/common/utilFilter.C
diff options
context:
space:
mode:
authorcrgeddes <crgeddes@us.ibm.com>2015-12-28 15:09:41 -0600
committerDaniel M. Crowell <dcrowell@us.ibm.com>2016-03-15 11:41:07 -0400
commitc06595679e76988d9403ad62d8539bb1486dee6b (patch)
treec0d018213831654624a3c49ea8c4e2b0d4687cf3 /src/usr/targeting/common/utilFilter.C
parent2c7af1f6cf8995bed10e9f2aacce431015bb4f96 (diff)
downloadtalos-hostboot-c06595679e76988d9403ad62d8539bb1486dee6b.tar.gz
talos-hostboot-c06595679e76988d9403ad62d8539bb1486dee6b.zip
FAPI2 GetParent Interface
This commit addes the getParent function the fapi2::target interface. Also in this commit I remove some old fapi dependencies, and changed some reasoncode information that was causing naming collisions. Change-Id: Ib9ba92eaccf29709dafcdead9c82ccc8f8b139c1 RTC:129517 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/837 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common/utilFilter.C')
-rw-r--r--src/usr/targeting/common/utilFilter.C30
1 files changed, 29 insertions, 1 deletions
diff --git a/src/usr/targeting/common/utilFilter.C b/src/usr/targeting/common/utilFilter.C
index 4783d12ee..aeca62ad3 100644
--- a/src/usr/targeting/common/utilFilter.C
+++ b/src/usr/targeting/common/utilFilter.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2012,2015 */
+/* Contributors Listed Below - COPYRIGHT 2012,2016 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -429,6 +429,34 @@ const Target * getParentChip( const Target * i_pChiplet )
return l_pChip;
}
+const Target * getParent( const Target * i_unit , TARGETING::TYPE &i_pType)
+{
+ const Target * l_parent = NULL;
+ TARGETING::PredicateCTM l_predicate;
+
+ l_predicate.setType(i_pType);
+
+ // Create a vector of TARGETING::Target pointers
+ TARGETING::TargetHandleList l_chipList;
+
+ // Get parent
+ TARGETING::targetService().getAssociated(l_chipList, i_unit,
+ TARGETING::TargetService::PARENT,
+ TARGETING::TargetService::ALL, &l_predicate);
+
+ if (l_chipList.size() == 1)
+ {
+ l_parent = l_chipList[0];
+ }
+ else
+ {
+ TARG_ERR("Number of Parent chip is not 1, but %d",l_chipList.size());
+ }
+
+ return l_parent;
+}
+
+
const Target * getExChiplet( const Target * i_pCoreChiplet )
{
const Target * l_pExChiplet = NULL;
OpenPOWER on IntegriCloud