[PATCH] tpm: Support new National TPMs

This patch is work to support new National TPMs that problems were reported
with on Thinkpad T43 and Thinkcentre S51.  Thanks to Jens and Gang for
their debugging work on these issues.

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>
This commit is contained in:
Kylene Jo Hall
2005-06-25 14:55:39 -07:00
committed by Linus Torvalds
parent b2b1866006
commit daacdfa6e7
3 changed files with 53 additions and 70 deletions

View File

@@ -31,8 +31,8 @@ enum tpm_timeout {
/* TPM addresses */
enum tpm_addr {
TPM_SUPERIO_ADDR = 0x2E,
TPM_ADDR = 0x4E,
TPM_DATA = 0x4F
};
extern ssize_t tpm_show_pubek(struct device *, struct device_attribute *attr,
@@ -79,16 +79,16 @@ struct tpm_chip {
struct list_head list;
};
static inline int tpm_read_index(int index)
static inline int tpm_read_index(int base, int index)
{
outb(index, TPM_ADDR);
return inb(TPM_DATA) & 0xFF;
outb(index, base);
return inb(base+1) & 0xFF;
}
static inline void tpm_write_index(int index, int value)
static inline void tpm_write_index(int base, int index, int value)
{
outb(index, TPM_ADDR);
outb(value & 0xFF, TPM_DATA);
outb(index, base);
outb(value & 0xFF, base+1);
}
extern int tpm_register_hardware(struct pci_dev *,