From 3093a8da7fb902b36d3f96600bb0e171740795cd Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Mon, 25 Apr 2016 16:30:27 -0700 Subject: tpm_regs: clean up debug messages Some debug messages were a bit ambiguous, and some just wrong, this patch fixes the wrong one and disambiguates the other two. BRANCH=none BUG=none TEST=observed the new generated message. Change-Id: I2b58ec050816ecdfe4b20dd8410910569767830d Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/340536 Reviewed-by: Bill Richardson --- common/tpm_registers.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/common/tpm_registers.c b/common/tpm_registers.c index fa32180849..e5d3b6e8df 100644 --- a/common/tpm_registers.c +++ b/common/tpm_registers.c @@ -177,8 +177,8 @@ static void access_reg_write(uint8_t data) break; default: - CPRINTF("%s: attempt to set access reg to 0x%02x\n", - __func__, data); + CPRINTF("%s: attempt to set access reg to an unsupported value" + " of 0x%02x\n", __func__, data); break; } } @@ -251,8 +251,8 @@ static void sts_reg_write(const uint8_t *data, uint32_t data_size) /* By definition only one bit can be set at a time. */ if (!single_bit_set(value)) { - CPRINTF("%s: attempt to set acces reg to %02x\n", - __func__, data); + CPRINTF("%s: attempt to set status reg to %02x\n", + __func__, value); return; } @@ -333,7 +333,7 @@ void tpm_register_put(uint32_t regaddr, const uint8_t *data, uint32_t data_size) uint32_t idata; memcpy(&idata, data, 4); - CPRINTF("%s(0x%06x, %d %x)\n", __func__, regaddr, data_size, idata); + CPRINTF("%s(0x%03x, %d %x)\n", __func__, regaddr, data_size, idata); switch (regaddr) { case TPM_ACCESS: -- cgit v1.2.1