tpm_lite_stub: clean up debug printouts in VbExTpmSendReceive

1) Callers of VbExTpmSendReceive often use the same buffer for
   TPM command and response. So, debug-print the command before
   sending to avoid it being overwritten with the response before
   printing.
2) VbExTpmSendReceive only prints execution time in debug mode.
   Execute gettimeofday() only when debug mode is enabled.
3) Avoid printing "DEBUG: " prefix before every byte in the
   command/response.

BUG=none
BRANCH=none
TEST=emerge-$BOARD vboot_reference with and without DEBUG=1,
     run tpmc commands, check the output.

Change-Id: I1bfe9a21e1a78227996eb7310a3584a9e5b73a87
Reviewed-on: https://chromium-review.googlesource.com/409613
Commit-Ready: Andrey Pronin <apronin@chromium.org>
Tested-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
1 file changed