summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H
diff options
context:
space:
mode:
authorZane Shelley <zshelle@us.ibm.com>2013-05-04 20:13:49 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-05-15 11:42:33 -0500
commited35ee5f59ea4768297116a505c2e8ad5d6b969b (patch)
tree62d9074214ab8df157c4de8035a25451fab8b19e /src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H
parenta12177273bacbfdf3a73a02a2b33968e21de9ede (diff)
downloadtalos-hostboot-ed35ee5f59ea4768297116a505c2e8ad5d6b969b.tar.gz
talos-hostboot-ed35ee5f59ea4768297116a505c2e8ad5d6b969b.zip
PRD: cleaned getConnected() and systemPtr->GetChip()
Change-Id: I87a3d3ee0a8e9f674890191857883aee61d6f303 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4370 Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server Squashed: I85a11aa02f63e4ad43bca1d69b94e1a69bf37fa9 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4514
Diffstat (limited to 'src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H')
-rw-r--r--src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H
index a3bab0d26..a239ad48d 100644
--- a/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H
+++ b/src/usr/diag/prdf/common/plat/pegasus/prdfCenMbaDataBundle_common.H
@@ -25,15 +25,16 @@
#define PRDF_CEN_MBA_DATABUNDLE_COMMON_H
/** @file prdfCenMbaDataBundle_common.H
- * @brief Contains the common data bundle for a PRD Centaur MBA object.
+ * @brief Contains the common data bundle for a Centaur MBA object.
*/
-//------------------------------------------------------------------------------
+#include <iipSystem.h>
+#include <prdfExtensibleChip.H>
+#include <prdfGlobal.H>
+#include <prdfPlatServices.H>
namespace PRDF
{
-//Forward decalration
-class ExtensibleChip;
/**
* @brief The P8 Centaur MBA data bundle.
@@ -47,15 +48,30 @@ class CenMbaDataBundleCommon : public DataBundle
* @param i_mbaChip The MBA chip.
*/
explicit CenMbaDataBundleCommon( ExtensibleChip * i_mbaChip ) :
- iv_mbaChip(i_mbaChip)
- {
- }
+ iv_mbaChip(i_mbaChip), iv_membChip(NULL)
+ {}
/**
* @brief Destructor.
*/
- ~CenMbaDataBundleCommon()
+ ~CenMbaDataBundleCommon() {}
+
+ /** @return The connected MEMBUF chip. */
+ ExtensibleChip * getMembChip()
{
+ using namespace TARGETING;
+ using namespace PlatServices;
+
+ if ( NULL == iv_membChip )
+ {
+ TargetHandle_t mba = iv_mbaChip->GetChipHandle();
+
+ TargetHandle_t memb = getConnectedParent( mba, TYPE_MEMBUF );
+ if ( NULL != memb )
+ iv_membChip = (ExtensibleChip *)systemPtr->GetChip( memb );
+ }
+
+ return iv_membChip;
}
private: // functions
@@ -65,7 +81,8 @@ class CenMbaDataBundleCommon : public DataBundle
private: // instance variables
- ExtensibleChip *iv_mbaChip; // mba chip
+ ExtensibleChip * iv_mbaChip; ///< This MBA chip
+ ExtensibleChip * iv_membChip; ///< The connected MEMBUF chip
};
} // end namespace PRDF
OpenPOWER on IntegriCloud