From: James Mckenzie Date: Sat, 3 Oct 2009 23:24:32 +0000 (+0100) Subject: Support for GM45 itpm X-Git-Url: http://xenbits.xen.org/gitweb?a=commitdiff_plain;h=94f7faf2217155847b713fee2bdf04b1c377e195;p=xenclient%2Flinux-2.6.27-pq.git Support for GM45 itpm --- diff --git a/master/itpm b/master/itpm new file mode 100644 index 0000000..82014aa --- /dev/null +++ b/master/itpm @@ -0,0 +1,58 @@ +diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c +index ed1879c..b83b305 100644 +--- a/drivers/char/tpm/tpm_tis.c ++++ b/drivers/char/tpm/tpm_tis.c +@@ -293,7 +293,7 @@ static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len) + wait_for_stat(chip, TPM_STS_VALID, chip->vendor.timeout_c, + &chip->vendor.int_queue); + status = tpm_tis_status(chip); +- if ((status & TPM_STS_DATA_EXPECT) == 0) { ++ if ((status & TPM_STS_VALID) == 0) { + rc = -EIO; + goto out_err; + } +@@ -430,7 +430,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) + return IRQ_HANDLED; + } + +-static int interrupts = 1; ++static int interrupts = 0; + module_param(interrupts, bool, 0444); + MODULE_PARM_DESC(interrupts, "Enable interrupts"); + +@@ -450,19 +450,19 @@ static int tpm_tis_init(struct device *dev, resource_size_t start, + goto out_err; + } + +- if (request_locality(chip, 0) != 0) { +- rc = -ENODEV; +- goto out_err; +- } +- +- vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); +- + /* Default timeouts */ + chip->vendor.timeout_a = msecs_to_jiffies(TIS_SHORT_TIMEOUT); + chip->vendor.timeout_b = msecs_to_jiffies(TIS_LONG_TIMEOUT); + chip->vendor.timeout_c = msecs_to_jiffies(TIS_SHORT_TIMEOUT); + chip->vendor.timeout_d = msecs_to_jiffies(TIS_SHORT_TIMEOUT); + ++ if (request_locality(chip, 0) != 0) { ++ rc = -ENODEV; ++ goto out_err; ++ } ++ ++ vendor = ioread32(chip->vendor.iobase + TPM_DID_VID(0)); ++ + dev_info(dev, + "1.2 TPM (device-id 0x%X, rev-id %d)\n", + vendor >> 16, ioread8(chip->vendor.iobase + TPM_RID(0))); +@@ -653,7 +653,7 @@ static struct device_driver tis_drv = { + + static struct platform_device *pdev; + +-static int force; ++static int force = 1; + module_param(force, bool, 0444); + MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry"); + static int __init init_tis(void) diff --git a/master/series b/master/series index 09f7295..dec84c8 100644 --- a/master/series +++ b/master/series @@ -315,3 +315,4 @@ blktap2-smp-map-unmap bridge-carrier-follows-prio0.patch v2v-core bsg-add-global-sgio-mutex.patch +itpm