aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hw/npu2-hw-procedures.c7
-rw-r--r--hw/npu2-opencapi.c5
-rw-r--r--include/npu2.h3
3 files changed, 10 insertions, 5 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 */
}
diff --git a/hw/npu2-opencapi.c b/hw/npu2-opencapi.c
index b2740f3..090223e 100644
--- a/hw/npu2-opencapi.c
+++ b/hw/npu2-opencapi.c
@@ -1194,7 +1194,7 @@ static int64_t npu2_opencapi_freset(struct pci_slot *slot)
}
dev->train_need_fence = true;
slot->link_retries = OCAPI_LINK_TRAINING_RETRIES;
- npu2_opencapi_phy_setup(dev);
+ npu2_opencapi_phy_reset(dev);
/* fall-through */
case OCAPI_SLOT_FRESET_INIT:
assert_odl_reset(chip_id, dev->brick_index);
@@ -1603,7 +1603,7 @@ static int setup_irq(struct npu2 *p)
static void setup_debug_training_state(struct npu2_dev *dev)
{
- npu2_opencapi_phy_setup(dev);
+ npu2_opencapi_phy_reset(dev);
switch (npu2_ocapi_training_state) {
case NPU2_TRAIN_PRBS31:
@@ -1675,6 +1675,7 @@ static void setup_device(struct npu2_dev *dev)
/* Procedure 13.1.3.9 - AFU Config BARs */
setup_afu_config_bars(dev->npu->chip_id, dev->npu->xscom_base, dev);
setup_perf_counters(dev);
+ npu2_opencapi_phy_init(dev);
set_fence_control(dev->npu->chip_id, dev->npu->xscom_base, dev->brick_index, 0b00);
diff --git a/include/npu2.h b/include/npu2.h
index b62d174..a2bcc45 100644
--- a/include/npu2.h
+++ b/include/npu2.h
@@ -224,7 +224,8 @@ void npu2_set_link_flag(struct npu2_dev *ndev, uint8_t flag);
void npu2_clear_link_flag(struct npu2_dev *ndev, uint8_t flag);
uint32_t reset_ntl(struct npu2_dev *ndev);
extern int nv_zcal_nominal;
-void npu2_opencapi_phy_setup(struct npu2_dev *dev);
+void npu2_opencapi_phy_init(struct npu2_dev *dev);
+void npu2_opencapi_phy_reset(struct npu2_dev *dev);
void npu2_opencapi_phy_prbs31(struct npu2_dev *dev);
void npu2_opencapi_bump_ui_lane(struct npu2_dev *dev);
int64_t npu2_freeze_status(struct phb *phb __unused,