aboutsummaryrefslogtreecommitdiff
path: root/include/xscom.h
diff options
context:
space:
mode:
authorMahesh Salgaonkar <mahesh@linux.vnet.ibm.com>2017-12-08 16:19:42 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-12-11 19:30:46 -0600
commit10f0a09239ddfd4faf47d792f04d3124fb347f88 (patch)
treebbf6652baf6b769dc33498810c7c2f60e8537c1d /include/xscom.h
parent363f328fbc597a5996fc3b28e509c09f2869888f (diff)
downloadskiboot-10f0a09239ddfd4faf47d792f04d3124fb347f88.zip
skiboot-10f0a09239ddfd4faf47d792f04d3124fb347f88.tar.gz
skiboot-10f0a09239ddfd4faf47d792f04d3124fb347f88.tar.bz2
opal/xscom: Add recovery for lost core wakeup scom failures.
Due to a hardware issue where core responding to scom was delayed due to thread reconfiguration, leaves the SCOM logic in a state where the subsequent scom to that core can get errors. This is affected for Core PC scom registers in the range of 20010A80-20010ABF The solution is if a xscom timeout occurs to one of Core PC scom registers in the range of 20010A80-20010ABF, a clearing scom write is done to 0x20010800 with data of '0x00000000' which will also get a timeout but clears the scom logic errors. After the clearing write is done the original scom operation can be retried. The scom timeout is reported as status 0x4 (Invalid address) in HMER[21-23]. Signed-off-by: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include/xscom.h')
-rw-r--r--include/xscom.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/xscom.h b/include/xscom.h
index 5a5d0b9..9853224 100644
--- a/include/xscom.h
+++ b/include/xscom.h
@@ -206,6 +206,14 @@
/* Max number of retries when XSCOM remains busy */
#define XSCOM_BUSY_MAX_RETRIES 3000
+/* Max number of retries for xscom clearing recovery. */
+#define XSCOM_CLEAR_MAX_RETRIES 10
+
+/* xscom clear address range/mask */
+#define XSCOM_CLEAR_RANGE_START 0x20010A00
+#define XSCOM_CLEAR_RANGE_END 0x20010ABF
+#define XSCOM_CLEAR_RANGE_MASK 0x200FFBFF
+
/* Retry count after which to reset XSCOM, if still busy */
#define XSCOM_BUSY_RESET_THRESHOLD 1000