]> xenbits.xen.org Git - xenclient/linux-2.6.27-pq.git/commitdiff
Support for GM45 itpm
authorJames Mckenzie <jamesmck@taoand.(none)>
Sat, 3 Oct 2009 23:24:32 +0000 (00:24 +0100)
committerJames Mckenzie <jamesmck@taoand.(none)>
Sat, 3 Oct 2009 23:24:32 +0000 (00:24 +0100)
master/itpm [new file with mode: 0644]
master/series

diff --git a/master/itpm b/master/itpm
new file mode 100644 (file)
index 0000000..82014aa
--- /dev/null
@@ -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)
index 09f7295485df1ffef5a78b636bedc062aa0c89b4..dec84c89789414bf3f1aea7f32f4d9c428d40806 100644 (file)
@@ -315,3 +315,4 @@ blktap2-smp-map-unmap
 bridge-carrier-follows-prio0.patch
 v2v-core
 bsg-add-global-sgio-mutex.patch
+itpm