[Skiboot] [PATCH V2 1/4] nvlink: Clear error registers at the end of the reset procedure
Russell Currey
ruscur at russell.cc
Mon Jan 18 16:59:39 AEDT 2016
Once the NPU has been reset, it should no longer have any fixable errors.
Clear any relevant error registers at the end of the reset procedure.
There may be other error registers that should be cleared, if found they
will be added later.
Signed-off-by: Russell Currey <ruscur at russell.cc>
---
V2: Iterate up to NPU_NUM_OF_PES instead of total devices
---
hw/npu-hw-procedures.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/npu-hw-procedures.c b/hw/npu-hw-procedures.c
index 24f3b2c..ba87d43 100644
--- a/hw/npu-hw-procedures.c
+++ b/hw/npu-hw-procedures.c
@@ -154,6 +154,12 @@ static uint32_t reset_npu_dl(struct npu_dev *npu_dev)
xscom_write(npu_dev->npu->chip_id, npu_dev->xscom + NX_TL_CMD_D_CR, PPC_BIT(0));
xscom_write(npu_dev->npu->chip_id, npu_dev->xscom + NX_TL_RSP_CR, PPC_BIT(15));
xscom_write(npu_dev->npu->chip_id, npu_dev->xscom + NX_TL_RSP_D_CR, PPC_BIT(15));
+
+ /* Reset error registers. TODO: are there more we should clear here? */
+ npu_ioda_sel(npu_dev->npu, NPU_IODA_TBL_PESTB, 0, true);
+ for (val = 0; val < NPU_NUM_OF_PES; val++)
+ out_be64(npu_dev->npu->at_regs + NPU_IODA_DATA0, 0);
+
return PROCEDURE_COMPLETE;
}
DEFINE_PROCEDURE(reset_npu_dl);
--
2.7.0
More information about the Skiboot
mailing list