aboutsummaryrefslogtreecommitdiff
path: root/hw/npu2-opencapi.c
diff options
context:
space:
mode:
authorFrederic Barrat <fbarrat@linux.vnet.ibm.com>2018-03-23 17:33:36 +0100
committerStewart Smith <stewart@linux.ibm.com>2018-04-11 17:59:57 -0500
commit9067098cfef9ec3a5b637e1015359d1fcd71cb8b (patch)
treed6985c218f2e9b2963f46d1ec25300cfb08b7fe6 /hw/npu2-opencapi.c
parent5954536a2f8c308bb8a396b0bda448fc09040be1 (diff)
downloadskiboot-9067098cfef9ec3a5b637e1015359d1fcd71cb8b.zip
skiboot-9067098cfef9ec3a5b637e1015359d1fcd71cb8b.tar.gz
skiboot-9067098cfef9ec3a5b637e1015359d1fcd71cb8b.tar.bz2
npu2-opencapi: Fix 'link internal error' FIR, take 1
When we setup a link, we always enable ODL0 and ODL1 at the same time in the PHY training config register, even though we are setting up only one OTL/ODL, so it raises a "link internal error" FIR bit in the PowerBus OLL FIR Register for the second link. The error is harmless, as we'll eventually setup the second link, but there's no reason to raise that FIR bit. The fix is simply to only enable the ODL we are using for the link. Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com> Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'hw/npu2-opencapi.c')
-rw-r--r--hw/npu2-opencapi.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c
index e66ba6f..35ea010 100644
--- a/hw/npu2-opencapi.c
+++ b/hw/npu2-opencapi.c
@@ -238,9 +238,23 @@ static void enable_odl_phy_mux(uint32_t gcid, int index)
/* PowerBus OLL PHY Training Config Register */
xscom_read(gcid, phy_config_scom, &reg);
- /* Enable ODLs to use shared PHYs */
- reg |= OBUS_IOOL_PHY_CONFIG_ODL0_ENABLED;
- reg |= OBUS_IOOL_PHY_CONFIG_ODL1_ENABLED;
+ /*
+ * Enable ODL to use shared PHYs
+ *
+ * On obus3, OTL0 is connected to ODL1 (and OTL1 to ODL0), so
+ * even if it may look odd at first, we do want to enable ODL0
+ * for links 2 and 5
+ */
+ switch (index) {
+ case 2:
+ case 5:
+ reg |= OBUS_IOOL_PHY_CONFIG_ODL0_ENABLED;
+ break;
+ case 3:
+ case 4:
+ reg |= OBUS_IOOL_PHY_CONFIG_ODL1_ENABLED;
+ break;
+ }
/*
* Based on the platform, we may have to activate an extra mux