[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>
这个提交包含在:
Kylene Jo Hall
2005-10-30 15:03:23 -08:00
提交者 Linus Torvalds
父节点 162a88f7b8
当前提交 b4ed3e3cbb
修改 5 个文件,包含 20 行新增1 行删除

查看文件

@@ -316,6 +316,11 @@ static void tpm_inf_cancel(struct tpm_chip *chip)
*/
}
static u8 tpm_inf_status(struct tpm_chip *chip)
{
return inb(chip->vendor->base + 1);
}
static DEVICE_ATTR(pubek, S_IRUGO, tpm_show_pubek, NULL);
static DEVICE_ATTR(pcrs, S_IRUGO, tpm_show_pcrs, NULL);
static DEVICE_ATTR(caps, S_IRUGO, tpm_show_caps, NULL);
@@ -344,6 +349,7 @@ static struct tpm_vendor_specific tpm_inf = {
.recv = tpm_inf_recv,
.send = tpm_inf_send,
.cancel = tpm_inf_cancel,
.status = tpm_inf_status,
.req_complete_mask = 0,
.req_complete_val = 0,
.attr_group = &inf_attr_grp,