diff mbox series

[3/4] npu3: Improve SALT log output

Message ID 1571779344-28464-4-git-send-email-arbab@linux.ibm.com
State Accepted
Headers show
Series npu3: Bringup errata | expand

Checks

Context Check Description
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (d75e82dbfbb9443efeb3f9a5921ac23605aab469)
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present

Commit Message

Reza Arbab Oct. 22, 2019, 9:22 p.m. UTC
Add a log line for when the PPE indicates it's not in the ready state,
and make all the SALT lines start with a capital to look nicer.

Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
---
 hw/npu3-nvlink.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/hw/npu3-nvlink.c b/hw/npu3-nvlink.c
index 0a185a1780be..3457b7314c35 100644
--- a/hw/npu3-nvlink.c
+++ b/hw/npu3-nvlink.c
@@ -1223,8 +1223,10 @@  static int64_t npu3_dev_salt(void *pvd, struct pci_cfg_reg_filter *pcrf,
 
 	/* Check for another command in progress */
 	val = npu3_dev_ppe_sram_read(dev, OB_PPE_SALT_CMD);
-	if (GETFIELD(OB_PPE_SALT_CMD_READY, val))
+	if (GETFIELD(OB_PPE_SALT_CMD_READY, val)) {
+		NPU3DEVINF(dev, "SALT_CMD 0x%x: Not ready\n", cmd_reg);
 		return OPAL_BUSY;
+	}
 
 	val = OB_PPE_SALT_CMD_READY;
 	val = SETFIELD(OB_PPE_SALT_CMD_RW, val, write);
@@ -1240,7 +1242,7 @@  static int64_t npu3_dev_salt(void *pvd, struct pci_cfg_reg_filter *pcrf,
 
 	while (GETFIELD(OB_PPE_SALT_CMD_READY, val)) {
 		if (tb_compare(mftb(), timeout) == TB_AAFTERB) {
-			NPU3DEVINF(dev, "SALT_CMD 0x%x: timeout\n", cmd_reg);
+			NPU3DEVINF(dev, "SALT_CMD 0x%x: Timeout\n", cmd_reg);
 			return OPAL_BUSY;
 		}
 
@@ -1248,7 +1250,7 @@  static int64_t npu3_dev_salt(void *pvd, struct pci_cfg_reg_filter *pcrf,
 	}
 
 	if (GETFIELD(OB_PPE_SALT_CMD_ERR, val))
-		NPU3DEVINF(dev, "SALT_CMD 0x%x: error\n", cmd_reg);
+		NPU3DEVINF(dev, "SALT_CMD 0x%x: Error\n", cmd_reg);
 
 	if (!write)
 		*data = GETFIELD(OB_PPE_SALT_CMD_DATA, val);