summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.h
diff options
context:
space:
mode:
authorKylene Jo Hall <kjhall@us.ibm.com>2005-06-25 14:55:39 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 16:24:38 -0700
commitdaacdfa6e7d6e57c5d1b8e72b1c863feb53d8a82 (patch)
treedc68ef70c69f34a9c394ec0eca73d0beb2c2d88a /drivers/char/tpm/tpm.h
parentb2b18660066997420b716c1881a6be8b82700d97 (diff)
downloadblackbird-op-linux-daacdfa6e7d6e57c5d1b8e72b1c863feb53d8a82.tar.gz
blackbird-op-linux-daacdfa6e7d6e57c5d1b8e72b1c863feb53d8a82.zip
[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>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r--drivers/char/tpm/tpm.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 10cb450191a6..373b41f6b460 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -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 *,
OpenPOWER on IntegriCloud