aboutsummaryrefslogtreecommitdiff
path: root/libstb/drivers
diff options
context:
space:
mode:
authorOliver O'Halloran <oohall@gmail.com>2018-05-21 11:29:25 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-05-22 02:50:57 -0500
commit81d52fb22cc95cc1a8fc1001dbac361843da2662 (patch)
tree8dfca98637158afccc207f6b52e36cbd1c969791 /libstb/drivers
parent3668dc88a1bdfc087ab7d329eabde5ac0086f9bf (diff)
downloadskiboot-81d52fb22cc95cc1a8fc1001dbac361843da2662.zip
skiboot-81d52fb22cc95cc1a8fc1001dbac361843da2662.tar.gz
skiboot-81d52fb22cc95cc1a8fc1001dbac361843da2662.tar.bz2
libstb/i2c-driver: Bump max timeout
We have observed some TPMs clock streching the I2C bus for signifigant amounts of time when processing commands. The same TPMs also have errata that can result in permernantly locking up a bus in response to an I2C transaction they don't understand. Using an excessively long timeout to prevent this in the field. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'libstb/drivers')
-rw-r--r--libstb/drivers/tpm_i2c_interface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libstb/drivers/tpm_i2c_interface.c b/libstb/drivers/tpm_i2c_interface.c
index a6342e0..8e5ba32 100644
--- a/libstb/drivers/tpm_i2c_interface.c
+++ b/libstb/drivers/tpm_i2c_interface.c
@@ -21,7 +21,8 @@
#include "tpm_i2c_interface.h"
#include "../status_codes.h"
-#define I2C_BYTE_TIMEOUT_MS 30 /* 30ms/byte timeout */
+/* TPMs can clock strech I2C operations for a LOOOOOOONG */
+#define I2C_BYTE_TIMEOUT_MS 2000 /* 2000ms/byte timeout */
/**
* tpm_i2c_request_send - send request to i2c bus