mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
Bring TPM driver files to 2.6.18 level. Remove the tpm.c so that the
one from the kernel can be used and reduce changes to a minimum required to compile the xen-specific driver. Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
This commit is contained in:
1 parent
5c4256ca47
commit
56c508cce0
4 files changed
+1
-1250
No files matched your search
@@ -22,7 +22,7 @@ config TCG_TPM
|
||||
|
||||
config TCG_TIS
|
||||
tristate "TPM Interface Specification 1.2 Interface"
|
||||
depends on TCG_TPM
|
||||
depends on TCG_TPM && PNPACPI
|
||||
---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
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -26,13 +26,6 @@
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#ifdef CONFIG_XEN
|
||||
enum tpm_bufsize {
|
||||
TPM_MIN_BUFFERSIZE = 2048,
|
||||
TPM_MAX_BUFFERSIZE = 64 * 1024,
|
||||
};
|
||||
#endif
|
||||
|
||||
enum tpm_timeout {
|
||||
TPM_TIMEOUT = 5, /* msecs */
|
||||
};
|
||||
@@ -68,9 +61,6 @@ struct tpm_vendor_specific {
|
||||
const u8 req_complete_mask;
|
||||
const u8 req_complete_val;
|
||||
const u8 req_canceled;
|
||||
#ifdef CONFIG_XEN
|
||||
u32 buffersize;
|
||||
#endif
|
||||
void __iomem *iobase; /* ioremapped address */
|
||||
unsigned long base; /* TPM base address */
|
||||
|
||||
@@ -104,9 +94,6 @@ struct tpm_chip {
|
||||
/* Data passed to and from the tpm via the read/write calls */
|
||||
u8 *data_buffer;
|
||||
atomic_t data_pending;
|
||||
#ifdef CONFIG_XEN
|
||||
atomic_t data_position;
|
||||
#endif
|
||||
struct semaphore buffer_mutex;
|
||||
|
||||
struct timer_list user_read_timer; /* user needs to claim result */
|
||||
@@ -138,17 +125,6 @@ static inline void tpm_write_index(int base, int index, int value)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_XEN
|
||||
static inline u32 get_chip_buffersize(struct tpm_chip *chip)
|
||||
{
|
||||
u32 size = chip->vendor.buffersize;
|
||||
if (size > TPM_MAX_BUFFERSIZE) {
|
||||
return TPM_MAX_BUFFERSIZE;
|
||||
} else if (size < TPM_MIN_BUFFERSIZE) {
|
||||
return TPM_MIN_BUFFERSIZE;
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
static inline void *chip_get_private(const struct tpm_chip *chip)
|
||||
{
|
||||
return chip->priv;
|
||||
|
||||
@@ -519,9 +519,6 @@ struct tpm_chip *init_vtpm(struct device *dev,
|
||||
vtpms->tpmvd = tvd;
|
||||
vtpms->tpm_private = tp;
|
||||
|
||||
if (tvd)
|
||||
tpm_vtpm.buffersize = tvd->max_tx_size;
|
||||
|
||||
chip = tpm_register_hardware(dev, &tpm_vtpm);
|
||||
if (!chip) {
|
||||
rc = -ENODEV;
|
||||
|
||||