coreboot/src/drivers
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
..
ams drivers/ams: Set default values in Kconfig 2015-11-22 01:39:44 +01:00
aspeed Remove extra newlines from the end of all coreboot files. 2016-07-31 18:19:33 +02:00
ati/ragexl src/drivers: Add required space before opening parenthesis '(' 2016-08-31 20:12:07 +02:00
dec/21143 kbuild: Allow drivers to fit src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:18 +02:00
elog elog: Print timestamp when logging event 2017-04-19 00:38:19 +02:00
emulation/qemu drivers/emulation: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:37:08 +02:00
generic drivers/regulator: Add driver for handling GPIO-based fixed regulator 2016-12-17 04:21:19 +01:00
gic arm64: Remove cpu intialization through device-tree 2015-11-07 03:29:35 +01:00
i2c drivers/i2c/tpm/cr50: Use tis_plat_irq_status for Cr50 IRQ status 2017-04-24 22:15:59 +02:00
ics/954309 drivers/ics: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:43 +02:00
intel drivers/intel/mipi_camera: Add MIPI CSI camera SSDT generator 2017-04-19 16:22:02 +02:00
ipmi src/drivers: Add required space before opening parenthesis '(' 2016-08-31 20:12:07 +02:00
lenovo Remove extra newlines from the end of all coreboot files. 2016-07-31 18:19:33 +02:00
maxim drivers/aspeed: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:17 +02:00
net drivers/net/rt8168: Add a macaddress cbfsfile using Kconfig 2017-01-26 17:59:17 +01:00
parade parade/ps8640: disable mipi mcs 2016-08-31 19:59:29 +02:00
pc80 *.asl: Remove obsolete reference to TPM ASL file 2017-04-24 19:14:11 +02:00
ricoh/rce822 buildsystem: Drop explicit (k)config.h includes 2016-12-08 19:46:53 +01:00
siemens/nc_fpga siemens/nc_fpga: Add driver for Siemens NC FPGA 2016-07-06 22:38:58 +02:00
sil/3114 drivers/sil: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:36:05 +02:00
spi drivers/spi/tpm: Do not let MAINBOARD_HAS_SPI_TPM_CR50 depend on SPI_TPM 2017-04-24 22:02:45 +02:00
ti drivers/ti: Switch to src/drivers/[X]/[Y]/ scheme 2016-04-19 18:34:36 +02:00
uart drivers/uart/oxpcie_early.c: remove uart_fill_lb() 2016-12-30 04:48:45 +01:00
usb drivers/usb: Add option for baudrate of FT232H UART 2016-11-21 15:04:35 +01:00
xgi Add newlines at the end of all coreboot files 2016-08-01 21:43:56 +02:00
xpowers/axp209 Remove non-ascii & unprintable characters 2016-08-01 21:44:45 +02:00