aboutsummaryrefslogtreecommitdiff
path: root/include/fsp-elog.h
diff options
context:
space:
mode:
authorNeelesh Gupta <neelegup@linux.vnet.ibm.com>2014-11-14 00:50:34 +0530
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-11-14 12:29:33 +1100
commitd2a695ddb362b6f93e3fc4f8a8b509028c72825b (patch)
treea69cad49c1d5322f8436fbbafb5b9c843f025f69 /include/fsp-elog.h
parent0ee497d3db5a48252fc3ac4c748de277c7c592a8 (diff)
downloadskiboot-d2a695ddb362b6f93e3fc4f8a8b509028c72825b.zip
skiboot-d2a695ddb362b6f93e3fc4f8a8b509028c72825b.tar.gz
skiboot-d2a695ddb362b6f93e3fc4f8a8b509028c72825b.tar.bz2
i2c: Provide FFDC data in the driver
Define SRCs of I2C component and interface with the existing skiboot 'errorlog' infrasturcute for commiting the logs. Add the i2c specific OPAL error codes to differentiate various types of errors during i2c operations. To ease debugging, dump the i2c register contents, 'master' and 'request' structure bits in case any error occured during transfer on the bus. Minor clean-ups as well. Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'include/fsp-elog.h')
-rw-r--r--include/fsp-elog.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/fsp-elog.h b/include/fsp-elog.h
index df8b2f1..0610a77 100644
--- a/include/fsp-elog.h
+++ b/include/fsp-elog.h
@@ -74,6 +74,7 @@ enum elog_head_state {
#define OPAL_SENSOR 0x5345 /* SE */
#define OPAL_SLW 0x534C /* SL */
#define OPAL_FSP 0x4650 /* FP */
+#define OPAL_I2C 0x4943 /* IC */
/* SAPPHIRE SRC componenet ID*/
#define OPAL_CU 0x1000
@@ -104,6 +105,7 @@ enum elog_head_state {
#define OPAL_SE 0x2000
#define OPAL_SL 0x2100
#define OPAL_FP 0x2200
+#define OPAL_IC 0x2300
enum opal_reasoncode {
/* code update */
@@ -191,6 +193,12 @@ enum opal_reasoncode {
/* FSP */
OPAL_RC_FSP_POLL_TIMEOUT
= OPAL_FP | 0x10,
+/* I2C */
+ OPAL_RC_I2C_INIT = OPAL_IC | 0X10,
+ OPAL_RC_I2C_START_REQ = OPAL_IC | 0X11,
+ OPAL_RC_I2C_TIMEOUT = OPAL_IC | 0x12,
+ OPAL_RC_I2C_TRANSFER = OPAL_IC | 0x13,
+ OPAL_RC_I2C_RESET = OPAL_IC | 0x14,
};
#define DEFINE_LOG_ENTRY(reason, type, id, subsys, \