[Skiboot] [PATCH v2 17/31] libstb/drivers/tpm_i2c_nuvoton.c: write command ready

Claudio Carvalho cclaudio at linux.vnet.ibm.com
Wed Sep 28 18:01:16 AEST 2016


This adds the 5/5 step performed by the TPM I2C Nuvoton driver to
transmit a command to the TPM device. In this step the driver
sets the COMMAND_READY bit in the status register to indicate that the
TPM device is ready to receive a new command.

Signed-off-by: Claudio Carvalho <cclaudio at linux.vnet.ibm.com>
---
 libstb/drivers/tpm_i2c_nuvoton.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libstb/drivers/tpm_i2c_nuvoton.c b/libstb/drivers/tpm_i2c_nuvoton.c
index 3a6bf04..0f9ec24 100644
--- a/libstb/drivers/tpm_i2c_nuvoton.c
+++ b/libstb/drivers/tpm_i2c_nuvoton.c
@@ -433,6 +433,9 @@ static int tpm_transmit(struct tpm_dev *dev, uint8_t* buf, size_t cmdlen,
 	if (rc < 0)
 		goto out;
 
+	DBG("step 5/5: write command ready\n");
+	rc = tpm_status_write_byte(TCG_PTP_STS_COMMAND_READY);
+
 out:
 	DBG("**** tpm_transmit %s, rc=%d ****\n",
 	    (rc) ? "ERROR" : "SUCCESS", rc);
-- 
1.9.1



More information about the Skiboot mailing list