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 <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/19056
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Aaron Durbin 2017-03-27 17:25:06 -05:00
parent 45a0dbc95c
commit 5cf1fadeca
1 changed files with 1 additions and 0 deletions

View File

@ -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);