summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2014-05-21 11:26:40 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-05-29 12:12:29 -0500
commit192aff0a38f60718af72a730b0c968a35a56d74f (patch)
tree3492508d5b16d0d1850e7e515ad62988389fd04e /src/include/usr/hwpf/plat/fapiPlatAttributeService.H
parent2e0d16d32cb3ad4b5d8ead6531450204e2fec4e3 (diff)
downloadblackbird-hostboot-192aff0a38f60718af72a730b0c968a35a56d74f.tar.gz
blackbird-hostboot-192aff0a38f60718af72a730b0c968a35a56d74f.zip
Oscillator Init Code updates
Add supports for ATTR_OSCSWITCH_CTL0,1,2 and ATTR_REDUNDANT_CLOCKS Change-Id: I06872a90b77f1de242bce71381db99d0650f57d2 CQ: SW241624 RTC: 107923 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/11214 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf/plat/fapiPlatAttributeService.H')
-rw-r--r--src/include/usr/hwpf/plat/fapiPlatAttributeService.H37
1 files changed, 36 insertions, 1 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
index 31ecaccdc..c7482dd4d 100644
--- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
+++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H
@@ -55,6 +55,7 @@
#include <hwpf/hwp/mvpd_accessors/accessMBvpdL4BankDelete.H>
#include <hwpf/hwp/spd_accessors/getSpdAttrAccessor.H>
#include <hwpf/hwp/pll_accessors/getPllRingInfoAttr.H>
+#include <hwpf/hwp/chip_accessors/getOscswitchCtlAttr.H>
#include <vpd/spdenums.H>
#include <dimmConsts.H>
#include <util/singleton.H>
@@ -699,7 +700,22 @@ fapi::ReturnCode fapiPlatGetPciOscswitchConfig
fapi::ReturnCode fapiPlatGetSpdModspecComRefRawCard
(const fapi::Target * i_pDimmTarget,
uint8_t &o_val);
-
+/**
+ * @brief This function is called by the FAPI_ATTR_GET macro when getting the
+ * ATTR_SPD_MODSPEC_COM_REF_RAW_CARD attribute.
+ * ATTR_OSCSWITCH_CNTL0,1,2 attributes. It should not be called
+ * directly.
+ *
+ * @param[in] i_pProcTarget Processor Chip Target pointer
+ * @param[in] i_attr Attribute selection
+ * @param[out] o_pVal Pointer to output variable
+ * @param[in] i_len Size of o_pVal
+ */
+fapi::ReturnCode fapiPlatGetOscswitchCtl
+ (const fapi::Target * i_pProcTarget,
+ const fapi::getOscswitchCtl::Attr i_attr,
+ void * o_pVal,
+ const size_t i_len);
} // namespace platAttrSvc
@@ -1787,4 +1803,23 @@ fapi::ReturnCode fapiPlatGetSpdModspecComRefRawCard
fapi::FAPI_RC_SUCCESS : \
fapi::platAttrSvc::fapiPlatGetSpdModspecComRefRawCard(PTARGET, VAL)
+//------------------------------------------------------------------------------
+// MACROS to support osc switch control
+//------------------------------------------------------------------------------
+#define ATTR_OSCSWITCH_CTL0_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetOscswitchCtl \
+ (PTARGET,fapi::getOscswitchCtl::CTL0,&VAL,sizeof(VAL))
+#define ATTR_OSCSWITCH_CTL1_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetOscswitchCtl \
+ (PTARGET,fapi::getOscswitchCtl::CTL1,&VAL,sizeof(VAL))
+#define ATTR_OSCSWITCH_CTL2_GETMACRO(ID, PTARGET, VAL) \
+ fapi::AttrOverrideSync::getAttrOverrideFunc(fapi::ID, PTARGET, &VAL) ?\
+ fapi::FAPI_RC_SUCCESS : \
+ fapi::platAttrSvc::fapiPlatGetOscswitchCtl \
+ (PTARGET,fapi::getOscswitchCtl::CTL2,&VAL,sizeof(VAL))
+
#endif // FAPIPLATATTRIBUTESERVICE_H_
OpenPOWER on IntegriCloud