aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.h
diff options
context:
space:
mode:
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 {
31 31
32/* TPM addresses */ 32/* TPM addresses */
33enum tpm_addr { 33enum tpm_addr {
34 TPM_SUPERIO_ADDR = 0x2E,
34 TPM_ADDR = 0x4E, 35 TPM_ADDR = 0x4E,
35 TPM_DATA = 0x4F
36}; 36};
37 37
38extern ssize_t tpm_show_pubek(struct device *, struct device_attribute *attr, 38extern 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
82static inline int tpm_read_index(int index) 82static 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
88static inline void tpm_write_index(int index, int value) 88static 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
94extern int tpm_register_hardware(struct pci_dev *, 94extern int tpm_register_hardware(struct pci_dev *,