summaryrefslogtreecommitdiff
path: root/drivers/char/tpm/tpm_tis_core.h
diff options
context:
space:
mode:
authorLino Sanfilippo <l.sanfilippo@kunbus.com>2022-11-24 16:55:30 +0300
committerJarkko Sakkinen <jarkko@kernel.org>2023-04-24 16:15:53 +0300
commite87fcf0dc2b47fac5b4824f00f74dfbcd4acd363 (patch)
tree6a2889a065f1123fbd78c38a07d5bcb321c0b7c2 /drivers/char/tpm/tpm_tis_core.h
parent15d7aa4e46eba87242a320f39773aa16faddadee (diff)
downloadlinux-e87fcf0dc2b47fac5b4824f00f74dfbcd4acd363.tar.xz
tpm, tpm_tis: Only handle supported interrupts
According to the TPM Interface Specification (TIS) support for "stsValid" and "commandReady" interrupts is only optional. This has to be taken into account when handling the interrupts in functions like wait_for_tpm_stat(). To determine the supported interrupts use the capability query. Also adjust wait_for_tpm_stat() to only wait for interrupt reported status changes. After that process all the remaining status changes by polling the status register. Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com> Tested-by: Michael Niewöhner <linux@mniewoehner.de> Tested-by: Jarkko Sakkinen <jarkko@kernel.org> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'drivers/char/tpm/tpm_tis_core.h')
-rw-r--r--drivers/char/tpm/tpm_tis_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h
index 57718f43cf64..19ef8c1a4142 100644
--- a/drivers/char/tpm/tpm_tis_core.h
+++ b/drivers/char/tpm/tpm_tis_core.h
@@ -94,6 +94,7 @@ struct tpm_tis_data {
u16 manufacturer_id;
int locality;
int irq;
+ unsigned int int_mask;
unsigned long flags;
void __iomem *ilb_base_addr;
u16 clkrun_enabled;