coreboot-kgpe-d16/src
Daniel Kurtz c4852e7157 drivers/i2c/tpm/cr50: Use tis_plat_irq_status for Cr50 IRQ status
The Cr50 TPM uses an IRQ to provide a "status" signal used for hand-shaking
the reception of commands.  Real IRQs are not supported in firmware,
however firmware can still poll interrupt status registers for the same
effect.

Commit 94cc485338 ("drivers/i2c/tpm/cr50: Support interrupts for status")
added support for the Cr50 driver on X86 platforms to use a KConfig file
to supply an IRQ which it would poll using acpi_get_gpe.  If the IRQ is
not supplied, the Cr50 driver inserts a 20 ms wait.

Unfortunately this doesn't work so well when using the i2c connected Cr50
on ARM platforms.  Luckily, a more generic implementation to allow a
mainboard to supply a Cr50 IRQ status polling function was solved for SPI
connected Cr50s by commit 19e3d335bd ("drivers/spi/tpm: using tpm irq to
sync tpm transaction").

Let's refactor the i2c c50 driver to use this same approach, and change
eve and reef boards to make use of DRIVER_TPM_TIS_ACPI_INTERRUPT for
specifying the TPM flow control interrupt.

This essentially reverts these two commits:

48f708d199 drivers/i2c/tpm/cr50: Initialize IRQ status handler before probe
94cc485338 drivers/i2c/tpm/cr50: Support interrupts for status

And ports this commit to i2c/tpm/cr50:

19e3d335bd drivers/spi/tpm: using tpm irq to sync tpm transaction

As a side effect the tpm_vendor_specific IRQ field goes back to its
original usage as the "TPM 1.2 command complete" interrupt, instead of
being repurposed to hold the flow control IRQ.

BRANCH=none
BUG=b:36786804
TEST=Boot reef w/ serial enabled firmware, verify verstage sees
    "cr50 TPM" and does not complain about lack of tis_plat_irq_status().
TEST=Boot eve w/ serial enabled firmware, verify verstage sees
    "cr50 TPM" and does not complain about lack of tis_plat_irq_status().

Change-Id: I004329eae1d8aabda51c46b8504bf210484782b4
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-on: https://review.coreboot.org/19363
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2017-04-24 22:15:59 +02:00
..
acpi
arch x86/acpigen: Fix BufferSize of ResourceTemplate 2017-04-18 16:03:32 +02:00
commonlib commonlib/helpers: Add helper macro for member_size 2017-04-24 19:27:35 +02:00
console console: Make snprintf available in all stages 2017-04-24 19:25:21 +02:00
cpu AGESA: Unify heap location 2017-04-15 11:16:10 +02:00
device libgfxinit: Select CONFIG_VGA when needed 2017-04-08 13:03:52 +02:00
drivers drivers/i2c/tpm/cr50: Use tis_plat_irq_status for Cr50 IRQ status 2017-04-24 22:15:59 +02:00
ec ec/roda/it8518: Do EC write manually with long timeout 2017-04-08 13:17:56 +02:00
include console: Add convenient debug level macros for raminit 2017-04-19 16:25:45 +02:00
lib drivers/i2c/tpm: use iobuf library for marshaling commands 2017-04-24 19:07:07 +02:00
mainboard mainboard/google/reef: Add TPM_TIS_ACPI_INTERRUPT 2017-04-24 22:15:44 +02:00
northbridge nb/intel/pineview: Select RELOCATABLE_RAMSTAGE 2017-04-24 19:47:10 +02:00
soc soc/intel/common: provide default tis_plat_irq_status() implementation 2017-04-24 22:03:13 +02:00
southbridge [nb|sb]/amd/[amdfam10|sb700]: Add LPC bridge ACPI names for NB/SB 2017-04-17 23:33:09 +02:00
superio superio/fintek: Add support for Fintek F71808A 2017-03-27 19:19:56 +02:00
vboot Remove libverstage as separate library and source file class 2017-03-28 22:18:53 +02:00
vendorcode Kconfig: provide MAINBOARD_HAS_TPM_CR50 option 2017-04-24 22:02:55 +02:00
Kconfig Kconfig: provide MAINBOARD_HAS_TPM_CR50 option 2017-04-24 22:02:55 +02:00