aboutsummaryrefslogtreecommitdiff
path: root/include/opal.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/opal.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/opal.h')
-rw-r--r--include/opal.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/opal.h b/include/opal.h
index 8d37d9d..effcd17 100644
--- a/include/opal.h
+++ b/include/opal.h
@@ -20,7 +20,7 @@
/****** OPAL APIs ******/
/* Return codes */
-#define OPAL_SUCCESS 0
+#define OPAL_SUCCESS 0
#define OPAL_PARAMETER -1
#define OPAL_BUSY -2
#define OPAL_PARTIAL -3
@@ -37,6 +37,14 @@
#define OPAL_WRONG_STATE -14
#define OPAL_ASYNC_COMPLETION -15
#define OPAL_EMPTY -16
+#define OPAL_I2C_TIMEOUT -17
+#define OPAL_I2C_INVALID_CMD -18
+#define OPAL_I2C_LBUS_PARITY -19
+#define OPAL_I2C_BKEND_OVERRUN -20
+#define OPAL_I2C_BKEND_ACCESS -21
+#define OPAL_I2C_ARBT_LOST -22
+#define OPAL_I2C_NACK_RCVD -23
+#define OPAL_I2C_STOP_ERR -24
/* API Tokens (in r0) */
#define OPAL_TEST 0