Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 26115
b: refs/heads/master
c: 27084ef
h: refs/heads/master
i:
  26113: a5b0f23
  26111: ef1a864
v: v3
  • Loading branch information
Leendert van Doorn authored and Linus Torvalds committed Apr 22, 2006
1 parent f4e2136 commit b02f09d
Show file tree
Hide file tree
Showing 6 changed files with 671 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08e96e486dd1345ae0ad70247387d0d4fd346889
refs/heads/master: 27084efee0c3dc0eb15b5ed750aa9f1adb3983c3
11 changes: 10 additions & 1 deletion trunk/drivers/char/tpm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,18 @@ config TCG_TPM
Note: For more TPM drivers enable CONFIG_PNP, CONFIG_ACPI
and CONFIG_PNPACPI.

config TCG_TIS
tristate "TPM Interface Specification 1.2 Interface"
depends on TCG_TPM
---help---
If you have a TPM security chip that is compliant with the
TCG TIS 1.2 TPM specification say Yes and it will be accessible
from within Linux. To compile this driver as a module, choose
M here; the module will be called tpm_tis.

config TCG_NSC
tristate "National Semiconductor TPM Interface"
depends on TCG_TPM
depends on TCG_TPM && PNPACPI
---help---
If you have a TPM security chip from National Semicondutor
say Yes and it will be accessible from within Linux. To
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/char/tpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ obj-$(CONFIG_TCG_TPM) += tpm.o
ifdef CONFIG_ACPI
obj-$(CONFIG_TCG_TPM) += tpm_bios.o
endif
obj-$(CONFIG_TCG_TIS) += tpm_tis.o
obj-$(CONFIG_TCG_NSC) += tpm_nsc.o
obj-$(CONFIG_TCG_ATMEL) += tpm_atmel.o
obj-$(CONFIG_TCG_INFINEON) += tpm_infineon.o
3 changes: 3 additions & 0 deletions trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,9 @@ static ssize_t tpm_transmit(struct tpm_chip *chip, const char *buf,
goto out;
}

if (chip->vendor.irq)
goto out_recv;

stop = jiffies + tpm_calc_ordinal_duration(chip, ordinal);
do {
u8 status = chip->vendor.status(chip);
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/char/tpm/tpm.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ struct tpm_vendor_specific {
void __iomem *iobase; /* ioremapped address */
unsigned long base; /* TPM base address */

int irq;

int region_size;
int have_region;

Expand All @@ -73,8 +75,13 @@ struct tpm_vendor_specific {
u8 (*status) (struct tpm_chip *);
struct miscdevice miscdev;
struct attribute_group *attr_group;
struct list_head list;
int locality;
u32 timeout_a, timeout_b, timeout_c, timeout_d;
u32 duration[3];

wait_queue_head_t read_queue;
wait_queue_head_t int_queue;
};

struct tpm_chip {
Expand All @@ -100,6 +107,8 @@ struct tpm_chip {
struct list_head list;
};

#define to_tpm_chip(n) container_of(n, struct tpm_chip, vendor)

static inline int tpm_read_index(int base, int index)
{
outb(index, base);
Expand Down
Loading

0 comments on commit b02f09d

Please sign in to comment.