summaryrefslogtreecommitdiffstats
path: root/src/usr/hwas
diff options
context:
space:
mode:
authorJaymes Wilks <mjwilks@us.ibm.com>2018-07-19 12:57:03 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-08-13 10:40:27 -0500
commit8b8b8de8870034b121aad1aa1f571bb9e3d2dbc5 (patch)
treee91d5c057b9c4776f96a189511929e39273e1b1c /src/usr/hwas
parentce0ea22d0d9d93b1bf1cc491d93f7907c05185dc (diff)
downloadtalos-hostboot-8b8b8de8870034b121aad1aa1f571bb9e3d2dbc5.tar.gz
talos-hostboot-8b8b8de8870034b121aad1aa1f571bb9e3d2dbc5.zip
Implement generic i2c device callouts for FSP
Creates a new type of callout for i2c devices which populates the error log user details section with the address, port, engine, and i2c master of the device being called out. The change only affects the FSP path. Change-Id: I92acc092f105ee21346594f5e3733957e15ad768 RTC:94872 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/63223 Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Reviewed-by: MURULIDHAR NATARAJU <murulidhar@in.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/hwas')
-rw-r--r--src/usr/hwas/common/hwasCallout.C29
-rw-r--r--src/usr/hwas/hwasPlatCallout.C24
2 files changed, 52 insertions, 1 deletions
diff --git a/src/usr/hwas/common/hwasCallout.C b/src/usr/hwas/common/hwasCallout.C
index 588833572..a7ea7e224 100644
--- a/src/usr/hwas/common/hwasCallout.C
+++ b/src/usr/hwas/common/hwasCallout.C
@@ -242,6 +242,35 @@ void processCallout(errlHndl_t &io_errl,
}
break;
} // PART_CALLOUT
+ case (I2C_DEVICE_CALLOUT):
+ {
+ TARGETING::Target *i2cMaster = nullptr;
+
+ uint8_t * l_targetData = reinterpret_cast<uint8_t *>(pCalloutUD + 1);
+ bool wasErr = retrieveTarget(l_targetData, i2cMaster, io_errl);
+
+ if (!wasErr)
+ {
+ errlHndl_t errl = nullptr;
+
+ // TODO RTC 94872 - Uncomment this later after the FSP team
+ // implements it.
+ //
+ // errlHndl_t errl = platHandleI2cDeviceCallout(
+ // i2cMaster,
+ // pCalloutUD->engine,
+ // pCalloutUD->port,
+ // pCalloutUD->address,
+ // pCalloutUD->priority,
+ // io_errl);
+ if (errl)
+ {
+ HWAS_ERR("processCallout: error from platHandleI2cDeviceCallout");
+ errlCommit(errl, HWAS_COMP_ID);
+ }
+ }
+ break;
+ } // I2C_DEVICE_CALLOUT
default:
{
diff --git a/src/usr/hwas/hwasPlatCallout.C b/src/usr/hwas/hwasPlatCallout.C
index 5c6f8e687..ce1ec18b6 100644
--- a/src/usr/hwas/hwasPlatCallout.C
+++ b/src/usr/hwas/hwasPlatCallout.C
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2013,2017 */
+/* Contributors Listed Below - COPYRIGHT 2013,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -192,6 +192,28 @@ errlHndl_t platHandleBusCallout(
}
//******************************************************************************
+// platHandleI2cDeviceCallout
+//******************************************************************************
+errlHndl_t platHandleI2cDeviceCallout(
+ TARGETING::Target *i_i2cMaster,
+ uint8_t i_engine,
+ uint8_t i_port,
+ uint8_t i_address,
+ callOutPriority i_priority,
+ errlHndl_t &io_errl)
+{
+ // WARNING:
+ // this hostboot code should not change io_errl, unless the caller of the
+ // processCallouts() function also changes, as today it (errlentry.C) calls
+ // from the errlEntry object
+
+ errlHndl_t errl = nullptr;
+
+ // hostboot does not yet handle or do any action for i2c callouts
+ return errl;
+}
+
+//******************************************************************************
// platHandleClockCallout
//******************************************************************************
errlHndl_t platHandleClockCallout(
OpenPOWER on IntegriCloud