summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/drivers/pc80/tpm/Kconfig8
-rw-r--r--src/drivers/pc80/tpm/acpi/tpm.asl30
2 files changed, 30 insertions, 8 deletions
diff --git a/src/drivers/pc80/tpm/Kconfig b/src/drivers/pc80/tpm/Kconfig
index f6a79483dc..0e8a0203df 100644
--- a/src/drivers/pc80/tpm/Kconfig
+++ b/src/drivers/pc80/tpm/Kconfig
@@ -23,6 +23,14 @@ config TPM_TIS_BASE_ADDRESS
Interface Specification 1.2 and should not be changed unless
the TPM being used does not conform to TPM TIS 1.2.
+config TPM_PIRQ
+ hex
+ default 0
+ depends on LPC_TPM
+ help
+ This can be used to specify a PIRQ to use instead of SERIRQ,
+ which is needed for SPI TPM interrupt support on x86.
+
config TPM_INIT_FAILURE_IS_FATAL
bool
default n
diff --git a/src/drivers/pc80/tpm/acpi/tpm.asl b/src/drivers/pc80/tpm/acpi/tpm.asl
index 489fec7308..044ff84d07 100644
--- a/src/drivers/pc80/tpm/acpi/tpm.asl
+++ b/src/drivers/pc80/tpm/acpi/tpm.asl
@@ -63,15 +63,29 @@ Device (TPM)
IVEC, 4, /* SERIRQ vector */
}
- If (LGreater (IVEC, 0)) {
- /* Update interrupt vector */
- CreateField (^IBUF, ^TIRQ._INT, 32, TVEC)
- Store (IVEC, TVEC)
+ CreateField (^IBUF, ^TIRQ._INT, 32, TVEC)
+ CreateBitField (^IBUF, ^TIRQ._HE, TTYP)
+ CreateBitField (^IBUF, ^TIRQ._LL, TPOL)
+ CreateBitField (^IBUF, ^TIRQ._SHR, TSHR)
+
+ If (LGreater (CONFIG_TPM_PIRQ, 0)) {
+ /*
+ * PIRQ: Update interrupt vector with configured PIRQ
+ */
+ Store (CONFIG_TPM_PIRQ, TVEC)
+
+ /* Active-Low Level-Triggered Shared */
+ Store (One, TPOL)
+ Store (Zero, TTYP)
+ Store (One, TSHR)
- /* Update interrupt type and polarity */
- CreateBitField (^IBUF, ^TIRQ._HE, TTYP)
- CreateBitField (^IBUF, ^TIRQ._LL, TPOL)
- CreateBitField (^IBUF, ^TIRQ._SHR, TSHR)
+ /* Merge IRQ with base address */
+ Return (ConcatenateResTemplate (RBUF, IBUF))
+ } ElseIf (LGreater (IVEC, 0)) {
+ /*
+ * SERIRQ: Update interrupt vector based on TPM register
+ */
+ Store (IVEC, TVEC)
If (LEqual (ITPL, 0x0)) {
/* Active-High Level-Triggered Shared */