summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/tpm/tpm.c
diff options
context:
space:
mode:
authorSergii Dmytruk <sergii.dmytruk@3mdeb.com>2022-10-29 20:42:28 +0300
committerFelix Held <felix-coreboot@felixheld.de>2023-11-13 14:17:38 +0000
commit963f7b9e5ec4713eb45dfb656659d2c9cf5d9f83 (patch)
tree514b17f5c5395dac6e9030d518459bf363bcebc6 /src/drivers/i2c/tpm/tpm.c
parentbf0b06d9bd71b9e188e2a1c509f7b90ca395e164 (diff)
security/tpm/: turn tis_{init,open} into tis_probe
init() was always followed by open() and after successful initialization we only need send-receive function which is now returned by tis_probe() on success, thus further reducing number of functions to export from drivers. This also removes check for opening TIS twice that seems to have no value. Change-Id: I52ad8d69d50d449f031c36b15bf70ef07986946c Ticket: https://ticket.coreboot.org/issues/433 Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76954 Reviewed-by: Julius Werner <jwerner@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/i2c/tpm/tpm.c')
-rw-r--r--src/drivers/i2c/tpm/tpm.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/drivers/i2c/tpm/tpm.c b/src/drivers/i2c/tpm/tpm.c
index 91c310b8f3..541eb3aaa0 100644
--- a/src/drivers/i2c/tpm/tpm.c
+++ b/src/drivers/i2c/tpm/tpm.c
@@ -507,8 +507,6 @@ tpm_result_t tpm_vendor_init(struct tpm_chip *chip, unsigned int bus, uint32_t d
tpm_dev.sleep_short = SLEEP_DURATION;
tpm_dev.sleep_long = SLEEP_DURATION_LONG;
- chip->is_open = 1;
-
chip->req_complete_mask = TPM_STS_DATA_AVAIL | TPM_STS_VALID;
chip->req_complete_val = TPM_STS_DATA_AVAIL | TPM_STS_VALID;
chip->req_canceled = TPM_STS_COMMAND_READY;