[coreboot-gerrit] Change in coreboot[master]: drivers/i2c/tpm: Remove vendor.i2c

Daniel Kurtz (Code Review) gerrit at coreboot.org
Fri Apr 21 05:12:27 CEST 2017


Hello Daniel Kurtz,

I'd like you to do a code review.  Please visit

    https://review.coreboot.org/19396

to review the following change.


Change subject: drivers/i2c/tpm: Remove vendor.i2c
......................................................................

drivers/i2c/tpm: Remove vendor.i2c

The vendor.i2c field was originally intended for use as the TPM 1.2
"command complete" interrupt.  However, all actual coreboot tpm drivers
and hardware use the vendor.status method of checking command completion
instead, and this irq field is not used.

Let's just remove this unused functionality to simplify the code.

BRANCH=none
BUG=b:36786804
TEST=Boot reef w/ serial enabled firmware, verify verstage sees
    "cr50 TPM" and does not complain about lack of tis_plat_irq_status().
TEST=Boot eve w/ serial enabled firmware, verify verstage sees
    "cr50 TPM" and does not complain about lack of tis_plat_irq_status().

Change-Id: I994c5bfbd18124af9cb81d9684117af766ab0124
Signed-off-by: Daniel Kurtz <djkurtz at chromium.org>
---
M src/drivers/i2c/tpm/tis.c
M src/drivers/i2c/tpm/tpm.c
M src/drivers/i2c/tpm/tpm.h
3 files changed, 0 insertions(+), 7 deletions(-)


  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/96/19396/1

diff --git a/src/drivers/i2c/tpm/tis.c b/src/drivers/i2c/tpm/tis.c
index 9bdf013..7cdb2a2 100644
--- a/src/drivers/i2c/tpm/tis.c
+++ b/src/drivers/i2c/tpm/tis.c
@@ -103,9 +103,6 @@
 		goto out;
 	}
 
-	if (chip->vendor.irq)
-		goto out_recv;
-
 	int timeout = 2 * 60 * 1000; /* two minutes timeout */
 	while (timeout) {
 		ASSERT(chip->vendor.status);
diff --git a/src/drivers/i2c/tpm/tpm.c b/src/drivers/i2c/tpm/tpm.c
index 5350695..cc44b48 100644
--- a/src/drivers/i2c/tpm/tpm.c
+++ b/src/drivers/i2c/tpm/tpm.c
@@ -545,9 +545,6 @@
 	chip->vendor.send = &tpm_tis_i2c_send;
 	chip->vendor.cancel = &tpm_tis_i2c_ready;
 
-	/* Disable interrupts (not supported) */
-	chip->vendor.irq = 0;
-
 	if (request_locality(chip, 0) != 0)
 		return -1;
 
diff --git a/src/drivers/i2c/tpm/tpm.h b/src/drivers/i2c/tpm/tpm.h
index 35cf397..1a01e05 100644
--- a/src/drivers/i2c/tpm/tpm.h
+++ b/src/drivers/i2c/tpm/tpm.h
@@ -58,7 +58,6 @@
 	uint8_t req_complete_mask;
 	uint8_t req_complete_val;
 	uint8_t req_canceled;
-	int irq;
 	int (*recv)(struct tpm_chip *, uint8_t *, size_t);
 	int (*send)(struct tpm_chip *, uint8_t *, size_t);
 	void (*cancel)(struct tpm_chip *);

-- 
To view, visit https://review.coreboot.org/19396
To unsubscribe, visit https://review.coreboot.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I994c5bfbd18124af9cb81d9684117af766ab0124
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurtz <djkurtz at google.com>
Gerrit-Reviewer: Daniel Kurtz <djkurtz at chromium.org>



More information about the coreboot-gerrit mailing list