aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_atmel.c
diff options
context:
space:
mode:
authorKylene Jo Hall <kjhall@us.ibm.com>2005-06-25 17:55:39 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-25 19:24:38 -0400
commitdaacdfa6e7d6e57c5d1b8e72b1c863feb53d8a82 (patch)
treedc68ef70c69f34a9c394ec0eca73d0beb2c2d88a /drivers/char/tpm/tpm_atmel.c
parentb2b18660066997420b716c1881a6be8b82700d97 (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_atmel.c')
-rw-r--r--drivers/char/tpm/tpm_atmel.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c
index 61fe14a77124..cc2cc77fd174 100644
--- a/drivers/char/tpm/tpm_atmel.c
+++ b/drivers/char/tpm/tpm_atmel.c
@@ -163,24 +163,24 @@ static int __devinit tpm_atml_init(struct pci_dev *pci_dev,
163 if (pci_enable_device(pci_dev)) 163 if (pci_enable_device(pci_dev))
164 return -EIO; 164 return -EIO;
165 165
166 lo = tpm_read_index( TPM_ATMEL_BASE_ADDR_LO ); 166 lo = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_LO);
167 hi = tpm_read_index( TPM_ATMEL_BASE_ADDR_HI ); 167 hi = tpm_read_index(TPM_ADDR, TPM_ATMEL_BASE_ADDR_HI);
168 168
169 tpm_atmel.base = (hi<<8)|lo; 169 tpm_atmel.base = (hi<<8)|lo;
170 dev_dbg( &pci_dev->dev, "Operating with base: 0x%x\n", tpm_atmel.base); 170 dev_dbg( &pci_dev->dev, "Operating with base: 0x%x\n", tpm_atmel.base);
171 171
172 /* verify that it is an Atmel part */ 172 /* verify that it is an Atmel part */
173 if (tpm_read_index(4) != 'A' || tpm_read_index(5) != 'T' 173 if (tpm_read_index(TPM_ADDR, 4) != 'A' || tpm_read_index(TPM_ADDR, 5) != 'T'
174 || tpm_read_index(6) != 'M' || tpm_read_index(7) != 'L') { 174 || tpm_read_index(TPM_ADDR, 6) != 'M' || tpm_read_index(TPM_ADDR, 7) != 'L') {
175 rc = -ENODEV; 175 rc = -ENODEV;
176 goto out_err; 176 goto out_err;
177 } 177 }
178 178
179 /* query chip for its version number */ 179 /* query chip for its version number */
180 if ((version[0] = tpm_read_index(0x00)) != 0xFF) { 180 if ((version[0] = tpm_read_index(TPM_ADDR, 0x00)) != 0xFF) {
181 version[1] = tpm_read_index(0x01); 181 version[1] = tpm_read_index(TPM_ADDR, 0x01);
182 version[2] = tpm_read_index(0x02); 182 version[2] = tpm_read_index(TPM_ADDR, 0x02);
183 version[3] = tpm_read_index(0x03); 183 version[3] = tpm_read_index(TPM_ADDR, 0x03);
184 } else { 184 } else {
185 dev_info(&pci_dev->dev, "version query failed\n"); 185 dev_info(&pci_dev->dev, "version query failed\n");
186 rc = -ENODEV; 186 rc = -ENODEV;