aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_infineon.c
diff options
context:
space:
mode:
authorKylene Jo Hall <kjhall@us.ibm.com>2005-10-30 18:03:23 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:37:28 -0500
commitb4ed3e3cbb312869929cf4528d71e52629a6cacb (patch)
treed514dfb584eebf74f7d89d3cdd57618e55aaaeca /drivers/char/tpm/tpm_infineon.c
parent162a88f7b8539a097a088c0321ea1997cacccaea (diff)
[PATCH] tpm: add status function to allow non-lpc bus chips
This patch is in preparation of supporting chips that are not necessarily on the lpc bus and thus are not accessed with inb's and outb's. The patch replaces the call to get the chip's status in the tpm.c file with a vendor specific status function. The patch also defines the function for each of the current supported devices. 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_infineon.c')
-rw-r--r--drivers/char/tpm/tpm_infineon.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm_infineon.c b/drivers/char/tpm/tpm_infineon.c
index 939e51e119e6..5b2ed539c26f 100644
--- a/drivers/char/tpm/tpm_infineon.c
+++ b/drivers/char/tpm/tpm_infineon.c
@@ -316,6 +316,11 @@ static void tpm_inf_cancel(struct tpm_chip *chip)
316 */ 316 */
317} 317}
318 318
319static u8 tpm_inf_status(struct tpm_chip *chip)
320{
321 return inb(chip->vendor->base + 1);
322}
323
319static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL); 324static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL);
320static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL); 325static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL);
321static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL); 326static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL);
@@ -344,6 +349,7 @@ static struct tpm_vendor_specific tpm_inf = {
344 .recv = tpm_inf_recv, 349 .recv = tpm_inf_recv,
345 .send = tpm_inf_send, 350 .send = tpm_inf_send,
346 .cancel = tpm_inf_cancel, 351 .cancel = tpm_inf_cancel,
352 .status = tpm_inf_status,
347 .req_complete_mask = 0, 353 .req_complete_mask = 0,
348 .req_complete_val = 0, 354 .req_complete_val = 0,
349 .attr_group = &inf_attr_grp, 355 .attr_group = &inf_attr_grp,