summaryrefslogtreecommitdiffstats
path: root/src/usr/diag/prdf/common/framework/resolution
diff options
context:
space:
mode:
authorChris Phan <cphan@us.ibm.com>2013-11-21 20:10:12 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-01-15 13:37:39 -0600
commitc04465ebb93eee015d3ef1d6868a72c4726d4b3f (patch)
tree5c2f3220ce9dcf627075dce4361a941a99332891 /src/usr/diag/prdf/common/framework/resolution
parent1719a4f5d065c959020f0d7f3e2957341705b06d (diff)
downloadtalos-hostboot-c04465ebb93eee015d3ef1d6868a72c4726d4b3f.tar.gz
talos-hostboot-c04465ebb93eee015d3ef1d6868a72c4726d4b3f.zip
PRD: add clock osc callout
Change-Id: I9678f73ac5226dd7d0cd9d8817e72153feca1cae RTC: 87125 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/7383 Tested-by: Jenkins Server Reviewed-by: BENJAMIN J. WEISENBECK <bweisenb@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Zane Shelley <zshelle@us.ibm.com> Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/8062
Diffstat (limited to 'src/usr/diag/prdf/common/framework/resolution')
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfCallouts.H12
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C59
-rwxr-xr-xsrc/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H3
3 files changed, 53 insertions, 21 deletions
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H b/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H
index 00914dd1c..dc6159cd1 100755
--- a/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfCallouts.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2000,2013 */
+/* COPYRIGHT International Business Machines Corp. 2000,2014 */
/* */
/* p1 */
/* */
@@ -62,6 +62,14 @@ class PRDcallout
iv_type(PRDcalloutData::TYPE_TARGET)
{ iv_meldValue.target = i_target; }
+ /** @brief Constructor from TargetHandle_t
+ * with clock type info
+ */
+ PRDcallout( TARGETING::TargetHandle_t i_target,
+ PRDcalloutData::MruType i_type ) :
+ iv_type(i_type)
+ { iv_meldValue.target = i_target; }
+
/** @brief Constructor from MemoryMru */
PRDcallout( const MemoryMru & i_memmru ) :
iv_type(PRDcalloutData::TYPE_MEMMRU)
@@ -78,6 +86,8 @@ class PRDcallout
switch ( iv_type )
{
case PRDcalloutData::TYPE_TARGET:
+ case PRDcalloutData::TYPE_PROCCLK:
+ case PRDcalloutData::TYPE_PCICLK:
iv_meldValue.target = PlatServices::getTarget(i_val); break;
case PRDcalloutData::TYPE_MEMMRU:
case PRDcalloutData::TYPE_SYMFRU:
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C
index de16a2b58..c86c929b8 100755
--- a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.C
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2001,2013 */
+/* COPYRIGHT International Business Machines Corp. 2001,2014 */
/* */
/* p1 */
/* */
@@ -43,31 +43,54 @@ int32_t ClockResolution::Resolve(STEP_CODE_DATA_STRUCT & serviceData)
using namespace TARGETING;
uint32_t l_rc = SUCCESS;
- // Use clock routines for CLOCK_CARD types.
- // FIXME: RTC: 51628 will address clock target issue
- if ( (iv_targetType == TYPE_PROC) || (iv_targetType == TYPE_MEMBUF) )
+ // callout clock osc
+ if ( (iv_targetType == TYPE_PROC) ||
+ (iv_targetType == TYPE_PCI) ||
+ (iv_targetType == TYPE_MEMBUF) )
{
// Get clock card.
- TargetHandle_t l_ptargetClock = PlatServices::getClockId(
- iv_ptargetClock,
- iv_targetType );
+ TYPE oscType = (iv_targetType == TYPE_PCI) ?
+ TYPE_OSCPCICLK : TYPE_OSCREFCLK;
- // Find mux if no clock card available.
- if(NULL == l_ptargetClock)
- {
- l_ptargetClock = PlatServices::getClockMux(iv_ptargetClock);
- }
+ TargetHandle_t l_ptargetClock =
+ PlatServices::getClockId(iv_ptargetClock, oscType);
// Callout this chip if nothing else.
+ // FIXME - RTC: 91939
+ // will re-write this block of code when
+ // we can get osc targets from targeting again.
+ // In the mean time, we don't want to call out the
+ // chip for this.
if(NULL == l_ptargetClock)
{
- l_ptargetClock = iv_ptargetClock;
- }
+ //l_ptargetClock = iv_ptargetClock;
- //Just callout the clock source.
- //There is no clock target now so we don't want to make
- //any incorrect callout until it's implemented.
- //serviceData.service_data->SetCallout(l_ptargetClock);
+ //in hostboot, getClockId() won't work
+ //so use the chip target and clock type
+ #ifdef __HOSTBOOT_MODULE
+ serviceData.service_data->SetCallout(
+ PRDcallout(iv_ptargetClock,
+ iv_targetType == TYPE_PCI ?
+ PRDcalloutData::TYPE_PCICLK :
+ PRDcalloutData::TYPE_PROCCLK));
+ #endif
+ }
+ else
+ {
+ // callout the clock source
+ // HB does not have the osc target modeled
+ // so we need to use the proc target with
+ // osc clock type to call out
+ #ifndef __HOSTBOOT_MODULE
+ serviceData.service_data->SetCallout(l_ptargetClock);
+ #else
+ serviceData.service_data->SetCallout(
+ PRDcallout(l_ptargetClock,
+ iv_targetType == TYPE_PCI ?
+ PRDcalloutData::TYPE_PCICLK :
+ PRDcalloutData::TYPE_PROCCLK));
+ #endif
+ }
}
// Get all connected chips for non-CLOCK_CARD types.
else
diff --git a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H
index eb1a08c0e..35772572c 100755
--- a/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H
+++ b/src/usr/diag/prdf/common/framework/resolution/prdfClockResolution.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2009,2013 */
+/* COPYRIGHT International Business Machines Corp. 2009,2014 */
/* */
/* p1 */
/* */
@@ -63,7 +63,6 @@ public:
* @param[in] i_targetType type of target connected to clock source
* @return Non-SUCCESS if an internal function fails, SUCCESS otherwise.
*/
- // FIXME: The default target type needs to be set to a PROC clock card.
ClockResolution( TARGETING::TargetHandle_t i_pTargetHandle = NULL,
TARGETING::TYPE i_targetType = TARGETING::TYPE_PROC ) :
iv_ptargetClock( i_pTargetHandle ),
OpenPOWER on IntegriCloud