From b4ed3e3cbb312869929cf4528d71e52629a6cacb Mon Sep 17 00:00:00 2001 From: Kylene Jo Hall Date: Sun, 30 Oct 2005 15:03:23 -0800 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/tpm/tpm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/char/tpm/tpm.h') diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 373b41f6b46..ba70bf519fc 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -55,6 +55,7 @@ struct tpm_vendor_specific { int (*recv) (struct tpm_chip *, u8 *, size_t); int (*send) (struct tpm_chip *, u8 *, size_t); void (*cancel) (struct tpm_chip *); + u8 (*status) (struct tpm_chip *); struct miscdevice miscdev; struct attribute_group *attr_group; }; -- cgit From e659a3fe2027b19ecd8abb7ad79253672763454b Mon Sep 17 00:00:00 2001 From: Kylene Jo Hall Date: Sun, 30 Oct 2005 15:03:24 -0800 Subject: [PATCH] tpm: remove pci dependency Since the tpm does not have it's own pci id we have been consuming the lpc bus. This is not correct and causes problems to support non lpc bus chips. This patch removes the dependency on pci_dev from tpm.c The subsequent patches will stop the supported chips from registering as pci drivers. Signed-off-by: Kylene Hall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/tpm/tpm.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/char/tpm/tpm.h') diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index ba70bf519fc..27bc8ccb931 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -61,7 +61,7 @@ struct tpm_vendor_specific { }; struct tpm_chip { - struct pci_dev *pci_dev; /* PCI device stuff */ + struct device *dev; /* Device stuff */ int dev_num; /* /dev/tpm# */ int num_opens; /* only one allowed */ @@ -92,13 +92,13 @@ static inline void tpm_write_index(int base, int index, int value) outb(value & 0xFF, base+1); } -extern int tpm_register_hardware(struct pci_dev *, +extern int tpm_register_hardware(struct device *, struct tpm_vendor_specific *); extern int tpm_open(struct inode *, struct file *); extern int tpm_release(struct inode *, struct file *); extern ssize_t tpm_write(struct file *, const char __user *, size_t, loff_t *); extern ssize_t tpm_read(struct file *, char __user *, size_t, loff_t *); -extern void __devexit tpm_remove(struct pci_dev *); +extern void tpm_remove_hardware(struct device *); extern int tpm_pm_suspend(struct pci_dev *, pm_message_t); extern int tpm_pm_resume(struct pci_dev *); -- cgit From ce2c87d4f733b6fcd7b7fb1d5311c870339c9725 Mon Sep 17 00:00:00 2001 From: Kylene Jo Hall Date: Sun, 30 Oct 2005 15:03:25 -0800 Subject: [PATCH] tpm: change from pci_dev to dev power management functions This patch is in support of moving away from the lpc bus pci_dev. The power management prototypes used by platform drivers is different but the functionality remains the same. Signed-off-by: Kylene Hall Signed-off-by: Linus Torvalds --- drivers/char/tpm/tpm.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/char/tpm/tpm.h') diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 27bc8ccb931..024814b50c3 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -100,5 +100,5 @@ extern ssize_t tpm_write(struct file *, const char __user *, size_t, loff_t *); extern ssize_t tpm_read(struct file *, char __user *, size_t, loff_t *); extern void tpm_remove_hardware(struct device *); -extern int tpm_pm_suspend(struct pci_dev *, pm_message_t); -extern int tpm_pm_resume(struct pci_dev *); +extern int tpm_pm_suspend(struct device *, pm_message_t); +extern int tpm_pm_resume(struct device *); -- cgit From bbc5b21284318a7c981afa85fc4f51c1256eedec Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 1 Nov 2005 15:14:05 +0000 Subject: [PATCH] missing platform_device.h includes Signed-off-by: Al Viro Signed-off-by: Linus Torvalds --- drivers/char/tpm/tpm.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/char/tpm/tpm.h') diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 024814b50c3..99a60496ecc 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -24,6 +24,7 @@ #include #include #include +#include enum tpm_timeout { TPM_TIMEOUT = 5, /* msecs */ -- cgit