summaryrefslogtreecommitdiffstats
path: root/src/include/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/include/usr/hwas
parentce0ea22d0d9d93b1bf1cc491d93f7907c05185dc (diff)
downloadblackbird-hostboot-8b8b8de8870034b121aad1aa1f571bb9e3d2dbc5.tar.gz
blackbird-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/include/usr/hwas')
-rw-r--r--src/include/usr/hwas/common/hwasCallout.H43
1 files changed, 36 insertions, 7 deletions
diff --git a/src/include/usr/hwas/common/hwasCallout.H b/src/include/usr/hwas/common/hwasCallout.H
index 9bb0722fa..01275a012 100644
--- a/src/include/usr/hwas/common/hwasCallout.H
+++ b/src/include/usr/hwas/common/hwasCallout.H
@@ -137,7 +137,7 @@ enum clockTypeEnum
MEMCLK_TYPE = 2,
OSCREFCLK_TYPE = 3,
OSCPCICLK_TYPE = 4,
-
+
// Specify a specific clock source for the case where the code can determine
// which of the redundant sources is actually at fault
OSCPCICLK0_TYPE = 10, //Specifically clock 0
@@ -172,12 +172,13 @@ enum sensorTypeEnum
};
//
-const uint8_t HW_CALLOUT = 0x01;
-const uint8_t PROCEDURE_CALLOUT = 0x02;
-const uint8_t BUS_CALLOUT = 0x03;
-const uint8_t CLOCK_CALLOUT = 0x04;
-const uint8_t PART_CALLOUT = 0x05;
-const uint8_t SENSOR_CALLOUT = 0x06;
+const uint8_t HW_CALLOUT = 0x01;
+const uint8_t PROCEDURE_CALLOUT = 0x02;
+const uint8_t BUS_CALLOUT = 0x03;
+const uint8_t CLOCK_CALLOUT = 0x04;
+const uint8_t PART_CALLOUT = 0x05;
+const uint8_t SENSOR_CALLOUT = 0x06;
+const uint8_t I2C_DEVICE_CALLOUT = 0x07;
const uint8_t TARGET_IS_SENTINEL = 0xF0;
@@ -216,6 +217,12 @@ typedef struct callout_ud
uint32_t sensorId;
sensorTypeEnum sensorType;
};
+ struct { // type == I2C_DEVICE_CALLOUT
+ uint8_t engine;
+ uint8_t port;
+ uint8_t address;
+ // one Target will follow
+ };
}; // union
} callout_ud_t;
@@ -353,6 +360,28 @@ errlHndl_t platHandlePartCallout(
DeconfigEnum i_deconfigState = DECONFIG,
GARD_ErrorType i_gardErrorType = GARD_Fatal);
+/**
+ * @brief platform specific code to handle a bus callout that has been
+ * found in an errlog
+ *
+ * @param[in] i_i2cMaster I2c master target for the i2c device
+ * @param[in] i_engine I2c device engine
+ * @param[in] i_port I2c device port
+ * @param[in] i_address I2c device address
+ * @param[in] i_priority Enum indicating the priority of the callout
+ * @param[in] io_errl Reference to error log handle
+ *
+ * @return errlHndl_t valid errlHndl_t handle if there was an error,
+ * nullptr if no errors;
+ */
+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);
+
#endif // not PARSER
}; // end namespace
OpenPOWER on IntegriCloud