aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.h
diff options
context:
space:
mode:
authorKylene Jo Hall <kjhall@us.ibm.com>2006-04-22 05:37:38 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-04-22 12:19:54 -0400
commit9e18ee19179a7742999d0e2d4bfcba75b5562439 (patch)
treeda87b5f7547ae840fd797d2e3ddc71e5c7cb3307 /drivers/char/tpm/tpm.h
parente0dd03caf20d040a0a86b6bd74028ec9bda545f5 (diff)
[PATCH] tpm: command duration update
With the TPM 1.2 Specification, each command is classified as short, medium or long and the chip tells you the maximum amount of time for a response to each class of command. This patch provides and array of the classifications and a function to determine how long the response should be waited for. Also, it uses that information in the command processing to determine how long to poll for. The function is exported so the 1.2 driver can use the functionality to determine how long to wait for a DataAvailable interrupt if interrupts are being used. Signed-off-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r--drivers/char/tpm/tpm.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 4f005345bf37..1d28485b8fb3 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -63,6 +63,7 @@ struct tpm_vendor_specific {
63 u8 (*status) (struct tpm_chip *); 63 u8 (*status) (struct tpm_chip *);
64 struct miscdevice miscdev; 64 struct miscdevice miscdev;
65 struct attribute_group *attr_group; 65 struct attribute_group *attr_group;
66 u32 duration[3];
66}; 67};
67 68
68struct tpm_chip { 69struct tpm_chip {
@@ -100,6 +101,7 @@ static inline void tpm_write_index(int base, int index, int value)
100 outb(value & 0xFF, base+1); 101 outb(value & 0xFF, base+1);
101} 102}
102 103
104extern unsigned long tpm_calc_ordinal_duration(struct tpm_chip *, u32);
103extern struct tpm_chip* tpm_register_hardware(struct device *, 105extern struct tpm_chip* tpm_register_hardware(struct device *,
104 const struct tpm_vendor_specific *); 106 const struct tpm_vendor_specific *);
105extern int tpm_open(struct inode *, struct file *); 107extern int tpm_open(struct inode *, struct file *);