aboutsummaryrefslogtreecommitdiff
path: root/hw/npu-hw-procedures.c
diff options
context:
space:
mode:
authorRussell Currey <ruscur@russell.cc>2016-01-18 16:59:39 +1100
committerStewart Smith <stewart@linux.vnet.ibm.com>2016-01-21 11:59:47 +1100
commit3e10683f4a0a6d6a71d4a93b7dcdb3ecf54e1c9e (patch)
tree8dce096a074c1c98131ecc2a81d6cabc29b565a4 /hw/npu-hw-procedures.c
parentb2649b822ab57ab06f0028d8343320ae6e11cc50 (diff)
downloadskiboot-3e10683f4a0a6d6a71d4a93b7dcdb3ecf54e1c9e.zip
skiboot-3e10683f4a0a6d6a71d4a93b7dcdb3ecf54e1c9e.tar.gz
skiboot-3e10683f4a0a6d6a71d4a93b7dcdb3ecf54e1c9e.tar.bz2
nvlink: Clear error registers at the end of the reset procedure
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@russell.cc> Acked-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/npu-hw-procedures.c')
-rw-r--r--hw/npu-hw-procedures.c6
1 files changed, 6 insertions, 0 deletions
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);