aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMarcel Selhorst <tpm@selhorst.net>2007-11-28 19:21:27 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-11-29 12:24:52 -0500
commit05a462afe80553550bc77afc724ce60b42ad587e (patch)
tree74a545565f0bc1a7cb151b0e768840f454c51080 /drivers
parent19fd4bb2a0cfede054e4904e0b167e0ca4f36cc7 (diff)
TPM: fix TIS device driver locality request
During the initialization of the TPM TIS driver, the necessary locality has to be requested earlier in the init-process. Depending on the used TPM chip, this leads to wrong information. For example: Lenovo X61s with Atmel TPM: tpm_tis 00:0a: 1.2 TPM (device-id 0xFFFF, rev-id 255) But correct is: tpm_tis 00:0c: 1.2 TPM (device-id 0x3203, rev-id 9) This short patch fixes this issue. Signed-off-by: Marcel Selhorst <tpm@selhorst.net> Cc: Kylene Jo Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/tpm/tpm_tis.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index fd771a4d6d18..81503d94fecc 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -450,6 +450,11 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
450 goto out_err; 450 goto out_err;
451 } 451 }
452 452
453 if (request_locality(chip, 0) != 0) {
454 rc = -ENODEV;
455 goto out_err;
456 }
457
453 vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); 458 vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0));
454 459
455 /* Default timeouts */ 460 /* Default timeouts */
@@ -487,11 +492,6 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
487 if (intfcaps & TPM_INTF_DATA_AVAIL_INT) 492 if (intfcaps & TPM_INTF_DATA_AVAIL_INT)
488 dev_dbg(dev, "\tData Avail Int Support\n"); 493 dev_dbg(dev, "\tData Avail Int Support\n");
489 494
490 if (request_locality(chip, 0) != 0) {
491 rc = -ENODEV;
492 goto out_err;
493 }
494
495 /* INTERRUPT Setup */ 495 /* INTERRUPT Setup */
496 init_waitqueue_head(&chip->vendor.read_queue); 496 init_waitqueue_head(&chip->vendor.read_queue);
497 init_waitqueue_head(&chip->vendor.int_queue); 497 init_waitqueue_head(&chip->vendor.int_queue);