aboutsummaryrefslogtreecommitdiff
path: root/include/npu2-regs.h
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.ibm.com>2018-11-23 09:54:38 +0100
committerStewart Smith <stewart@linux.ibm.com>2018-11-28 17:51:58 +1100
commit64d06b1feed160c42d447750b6c5c0601d15487c (patch)
tree41ca95a1a7cf2a5d4cfdb8205372f9f3d647fd2f /include/npu2-regs.h
parentff376805bde5293a034616c75cd572d44ac28de0 (diff)
downloadskiboot-64d06b1feed160c42d447750b6c5c0601d15487c.zip
skiboot-64d06b1feed160c42d447750b6c5c0601d15487c.tar.gz
skiboot-64d06b1feed160c42d447750b6c5c0601d15487c.tar.bz2
npu2-opencapi: Detect if link trained in degraded mode
There's no status readily available to tell the effective link width. Instead, we have to look at the individual status of each lane, on the transmit and receive direction. All relevant information is in the ODL status register. Signed-off-by: Frederic Barrat <fbarrat@linux.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'include/npu2-regs.h')
-rw-r--r--include/npu2-regs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/npu2-regs.h b/include/npu2-regs.h
index 165e0b7..c5096dd 100644
--- a/include/npu2-regs.h
+++ b/include/npu2-regs.h
@@ -741,6 +741,8 @@ void npu2_scom_write(uint64_t gcid, uint64_t scom_base,
#define OB3_ODL0_STATUS 0xC01082C
#define OB3_ODL1_STATUS 0xC01082D
#define OB_ODL_STATUS_TRAINED_MODE PPC_BITMASK(0,3)
+#define OB_ODL_STATUS_RX_TRAINED_LANES PPC_BITMASK(16, 23)
+#define OB_ODL_STATUS_TX_TRAINED_LANES PPC_BITMASK(24, 31)
#define OB_ODL_STATUS_TRAINING_STATE_MACHINE PPC_BITMASK(49, 51)
#define OB0_ODL0_TRAINING_STATUS 0x901082E