diff options
author | Kylene Jo Hall <kjhall@us.ibm.com> | 2005-06-25 17:55:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-06-25 19:24:38 -0400 |
commit | daacdfa6e7d6e57c5d1b8e72b1c863feb53d8a82 (patch) | |
tree | dc68ef70c69f34a9c394ec0eca73d0beb2c2d88a /drivers/char/tpm/tpm.h | |
parent | b2b18660066997420b716c1881a6be8b82700d97 (diff) |
[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.h | 14 |
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 { | |||
31 | 31 | ||
32 | /* TPM addresses */ | 32 | /* TPM addresses */ |
33 | enum tpm_addr { | 33 | enum tpm_addr { |
34 | TPM_SUPERIO_ADDR = 0x2E, | ||
34 | TPM_ADDR = 0x4E, | 35 | TPM_ADDR = 0x4E, |
35 | TPM_DATA = 0x4F | ||
36 | }; | 36 | }; |
37 | 37 | ||
38 | extern ssize_t tpm_show_pubek(struct device *, struct device_attribute *attr, | 38 | extern ssize_t tpm_show_pubek(struct device *, struct device_attribute *attr, |
@@ -79,16 +79,16 @@ struct tpm_chip { | |||
79 | struct list_head list; | 79 | struct list_head list; |
80 | }; | 80 | }; |
81 | 81 | ||
82 | static inline int tpm_read_index(int index) | 82 | static inline int tpm_read_index(int base, int index) |
83 | { | 83 | { |
84 | outb(index, TPM_ADDR); | 84 | outb(index, base); |
85 | return inb(TPM_DATA) & 0xFF; | 85 | return inb(base+1) & 0xFF; |
86 | } | 86 | } |
87 | 87 | ||
88 | static inline void tpm_write_index(int index, int value) | 88 | static inline void tpm_write_index(int base, int index, int value) |
89 | { | 89 | { |
90 | outb(index, TPM_ADDR); | 90 | outb(index, base); |
91 | outb(value & 0xFF, TPM_DATA); | 91 | outb(value & 0xFF, base+1); |
92 | } | 92 | } |
93 | 93 | ||
94 | extern int tpm_register_hardware(struct pci_dev *, | 94 | extern int tpm_register_hardware(struct pci_dev *, |