From 5cf1fadeca706f8d3016ea44c3e482c2428d6b3f Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Mon, 27 Mar 2017 17:25:06 -0500 Subject: drivers/spi/tpm: de-assert chip select on transaction error In the case of start_transaction() failing the chip select is never deasserted. Correct that by deasserting the chip select when start_transaction() fails. BUG=b:36598499 Change-Id: I2c5200085eb357259edab39c1a0fa7b1d81ba7b2 Signed-off-by: Aaron Durbin Reviewed-on: https://review.coreboot.org/19056 Tested-by: build bot (Jenkins) Reviewed-by: Furquan Shaikh --- src/drivers/spi/tpm/tpm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/drivers/spi/tpm') diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c index b2bda8c928..e3faff09d1 100644 --- a/src/drivers/spi/tpm/tpm.c +++ b/src/drivers/spi/tpm/tpm.c @@ -171,6 +171,7 @@ static int start_transaction(int read_write, size_t bytes, unsigned addr) do { if (stopwatch_expired(&sw)) { printk(BIOS_ERR, "TPM flow control failure\n"); + tpm_if.cs_deassert(&tpm_if.slave); return 0; } tpm_if.xfer(&tpm_if.slave, NULL, 0, &byte, 1); -- cgit v1.2.3