diff options
author | Frederic Barrat <fbarrat@linux.ibm.com> | 2019-03-15 17:44:40 +0100 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-03-20 14:27:08 +1100 |
commit | 14a78d5c2e857fc52bd367584e0da4bd39a21ff8 (patch) | |
tree | 60ed60452348a95084c3110501ef0960d7e5a4c7 /hw/npu2-hw-procedures.c | |
parent | 11c5faa66aa09dc6ecbfd3d6682351c709f5c668 (diff) | |
download | skiboot-14a78d5c2e857fc52bd367584e0da4bd39a21ff8.zip skiboot-14a78d5c2e857fc52bd367584e0da4bd39a21ff8.tar.gz skiboot-14a78d5c2e857fc52bd367584e0da4bd39a21ff8.tar.bz2 |
npu2/hw-procedures: Fix parallel zcal for opencapi
For opencapi, we currently do impedance calibration when initializing
the PHY for the device, which could run in parallel if we were rich
and had multiple opencapi devices. But if 2 devices are on the same
obus, the 2 calibration sequences could overlap, which likely yields
bad results and is useless anyway since it only needs to be done once
per obus.
This patch splits the opencapi PHY reset in 2 parts:
- a 'init' part called serially at boot. That's when zcal is done. If
we have 2 devices on the same socket, the zcal won't be redone,
since we're called serially and we'll see it has already be done for
the obus
- a 'reset' part called during fundamental reset as a prereq for link
training. It does the PHY setup for a set of lanes and the dccal.
The PHY team confirmed there's no dependency between zcal and the
other reset steps and it can be moved earlier.
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 'hw/npu2-hw-procedures.c')
-rw-r--r-- | hw/npu2-hw-procedures.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/npu2-hw-procedures.c b/hw/npu2-hw-procedures.c index 2f33095..b671b8a 100644 --- a/hw/npu2-hw-procedures.c +++ b/hw/npu2-hw-procedures.c @@ -1017,17 +1017,20 @@ void npu2_opencapi_bump_ui_lane(struct npu2_dev *dev) } } -void npu2_opencapi_phy_setup(struct npu2_dev *dev) +void npu2_opencapi_phy_init(struct npu2_dev *dev) { + run_procedure(dev, 5); /* procedure_phy_tx_zcal */ /* * This is only required for OpenCAPI - Hostboot tries to set this * on systems where it can tell a link is OpenCAPI, but for * Witherspoon it needs to be done in skiboot after device detection. */ phy_write(dev, &NPU2_PHY_RX_RC_ENABLE_AUTO_RECAL, 0x1); +} +void npu2_opencapi_phy_reset(struct npu2_dev *dev) +{ run_procedure(dev, 4); /* procedure_phy_reset */ - run_procedure(dev, 5); /* procedure_phy_tx_zcal */ run_procedure(dev, 6); /* procedure_phy_rx_dccal */ } |