coreboot/src/drivers/i2c
Duncan Laurie 2bc6ad3ff1 drivers/i2c/tpm/cr50: Simplify and increase init delay to 30 seconds
The Cr50 i2c driver provides separate entry points for probing and
initialization, but probing function does not really do much.

It also claims and releases locality on every coreboot stage, but
there is no need for this - locality should be definitely claimed
after reset and then it could be retained through the boot process.

On top of that the driver does not properly account for long time it
could take the Cr50 chip to come around to reset processing if TPM
reset request was posted during a lengthy TPM operation.

This patch addresses the issues as follows:

  - tpm_vendor_probe() and tpm_vendor_cleanup() become noops, kept
    around to conform to the expected driver API.
  - tpm_vendor_init() invokes a function to process TPM reset only in
    the first stage using TPM (typically verstage), the function
    checks if locality is claimed and if so - waits for it to be
    released, which indicates that TPM reset processing is over.
  - before claiming locality check if it is already taken, and if so -
    just proceed.

BRANCH=none
BUG=b:65867313, b:68729265
TEST=Verified that reef no longer hangs during EC reboot and
     firmware_Cr50ClearTPMOwner (not yet merged) tests.

Change-Id: Iba8445caf1342e3a5fefcb2664b0759a1a8e84e3
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://review.coreboot.org/22554
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-22 15:18:03 +00:00
..
adm1026
adm1027
adt7463
alps device: acpi_name() should take a const struct device 2017-09-14 14:34:27 +00:00
at24rf08c src/drivers: Remove whitespace after memcpy & memset 2016-10-07 18:06:48 +02:00
ck505 drivers/i2c/ck505: Add generic driver to configure clockgen 2017-08-30 15:46:55 +00:00
da7219 device: acpi_name() should take a const struct device 2017-09-14 14:34:27 +00:00
generic device: acpi_name() should take a const struct device 2017-09-14 14:34:27 +00:00
hid device: acpi_name() should take a const struct device 2017-09-14 14:34:27 +00:00
i2cmux
i2cmux2
lm63
max98927 device: acpi_name() should take a const struct device 2017-09-14 14:34:27 +00:00
nau8825 device: acpi_name() should take a const struct device 2017-09-14 14:34:27 +00:00
pcf8523 src: Fix all Siemens copyrights 2017-11-07 12:33:51 +00:00
rt5663 device: acpi_name() should take a const struct device 2017-09-14 14:34:27 +00:00
rtd2132 src/drivers: Fix checkpatch warning: no spaces at the start of a line 2017-07-28 16:24:57 +00:00
rx6110sa src: Fix all Siemens copyrights 2017-11-07 12:33:51 +00:00
tpm drivers/i2c/tpm/cr50: Simplify and increase init delay to 30 seconds 2017-11-22 15:18:03 +00:00
w83793
w83795
ww_ring include/device: Split i2c.h into three 2017-08-18 15:33:29 +00:00