blob: 4ed6e660273a4142d015991fde826de1e7598537 [file] [log] [blame]
Thomas Gleixnerb886d83c2019-06-01 10:08:55 +02001// SPDX-License-Identifier: GPL-2.0-only
Leendert van Doorn27084ef2006-04-22 02:38:03 -07002/*
3 * Copyright (C) 2005, 2006 IBM Corporation
Jarkko Sakkinen399235d2015-09-29 00:32:19 +03004 * Copyright (C) 2014, 2015 Intel Corporation
Leendert van Doorn27084ef2006-04-22 02:38:03 -07005 *
6 * Authors:
7 * Leendert van Doorn <leendert@watson.ibm.com>
8 * Kylene Hall <kjhall@us.ibm.com>
9 *
Kent Yoder8e81cc12007-08-22 14:01:04 -070010 * Maintained by: <tpmdd-devel@lists.sourceforge.net>
11 *
Leendert van Doorn27084ef2006-04-22 02:38:03 -070012 * Device driver for TCG/TCPA TPM (trusted platform module).
13 * Specifications at www.trustedcomputinggroup.org
14 *
15 * This device driver implements the TPM interface as defined in
16 * the TCG TPM Interface Spec version 1.2, revision 1.0.
Leendert van Doorn27084ef2006-04-22 02:38:03 -070017 */
Kylene Jo Hall57135562006-04-22 02:39:44 -070018#include <linux/init.h>
19#include <linux/module.h>
20#include <linux/moduleparam.h>
Leendert van Doorn27084ef2006-04-22 02:38:03 -070021#include <linux/pnp.h>
Tejun Heo5a0e3ad2010-03-24 17:04:11 +090022#include <linux/slab.h>
Leendert van Doorn27084ef2006-04-22 02:38:03 -070023#include <linux/interrupt.h>
24#include <linux/wait.h>
Matthew Garrett3f0d3d02010-10-21 17:42:40 -040025#include <linux/acpi.h>
Stefan Berger20b87bb2011-03-30 12:13:31 -040026#include <linux/freezer.h>
Jason Gunthorpe420d4392016-11-07 15:44:31 -070027#include <linux/of.h>
28#include <linux/of_device.h>
Jérémy Lefaure33957a12017-10-01 15:30:51 -040029#include <linux/kernel.h>
Jerry Snitselaarb154ce12020-10-15 14:44:30 -070030#include <linux/dmi.h>
Leendert van Doorn27084ef2006-04-22 02:38:03 -070031#include "tpm.h"
Christophe Ricard57dacc22016-05-19 00:35:48 +020032#include "tpm_tis_core.h"
Leendert van Doorn27084ef2006-04-22 02:38:03 -070033
Jarkko Sakkinen399235d2015-09-29 00:32:19 +030034struct tpm_info {
Jason Gunthorpe51dd43d2016-01-07 17:36:23 -070035 struct resource res;
Jason Gunthorpeef7b81d2016-01-07 17:36:21 -070036 /* irq > 0 means: use irq $irq;
37 * irq = 0 means: autoprobe for an irq;
38 * irq = -1 means: no irq support
39 */
40 int irq;
Jarkko Sakkinen399235d2015-09-29 00:32:19 +030041};
42
Christophe Ricard57dacc22016-05-19 00:35:48 +020043struct tpm_tis_tcg_phy {
44 struct tpm_tis_data priv;
Christophe Ricard4eea7032016-03-31 22:56:55 +020045 void __iomem *iobase;
Scot Doyle448e9c52014-09-24 22:41:10 +000046};
47
Christophe Ricard57dacc22016-05-19 00:35:48 +020048static inline struct tpm_tis_tcg_phy *to_tpm_tis_tcg_phy(struct tpm_tis_data *data)
49{
50 return container_of(data, struct tpm_tis_tcg_phy, priv);
51}
52
Jerry Snitselaarb154ce12020-10-15 14:44:30 -070053static int interrupts = -1;
54module_param(interrupts, int, 0444);
Christophe Ricard41a5e1c2016-05-19 00:35:52 +020055MODULE_PARM_DESC(interrupts, "Enable interrupts");
56
57static bool itpm;
58module_param(itpm, bool, 0444);
59MODULE_PARM_DESC(itpm, "Force iTPM workarounds (found on some Lenovo laptops)");
60
61static bool force;
62#ifdef CONFIG_X86
63module_param(force, bool, 0444);
64MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry");
65#endif
66
Jerry Snitselaarb154ce12020-10-15 14:44:30 -070067static int tpm_tis_disable_irq(const struct dmi_system_id *d)
68{
69 if (interrupts == -1) {
70 pr_notice("tpm_tis: %s detected: disabling interrupts.\n", d->ident);
71 interrupts = 0;
72 }
73
74 return 0;
75}
76
77static const struct dmi_system_id tpm_tis_dmi_table[] = {
78 {
79 .callback = tpm_tis_disable_irq,
80 .ident = "ThinkPad T490s",
81 .matches = {
82 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
83 DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T490s"),
84 },
85 },
86 {}
87};
88
Randy Dunlap1560ffe62011-08-03 16:21:11 -070089#if defined(CONFIG_PNP) && defined(CONFIG_ACPI)
Jarkko Sakkinen399235d2015-09-29 00:32:19 +030090static int has_hid(struct acpi_device *dev, const char *hid)
Matthew Garrett3f0d3d02010-10-21 17:42:40 -040091{
Matthew Garrett3f0d3d02010-10-21 17:42:40 -040092 struct acpi_hardware_id *id;
93
Jarkko Sakkinen399235d2015-09-29 00:32:19 +030094 list_for_each_entry(id, &dev->pnp.ids, list)
95 if (!strcmp(hid, id->id))
Matthew Garrett3f0d3d02010-10-21 17:42:40 -040096 return 1;
Matthew Garrett3f0d3d02010-10-21 17:42:40 -040097
98 return 0;
99}
Jarkko Sakkinen399235d2015-09-29 00:32:19 +0300100
101static inline int is_itpm(struct acpi_device *dev)
102{
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600103 if (!dev)
104 return 0;
Jarkko Sakkinen399235d2015-09-29 00:32:19 +0300105 return has_hid(dev, "INTC0102");
106}
Randy Dunlap1560ffe62011-08-03 16:21:11 -0700107#else
Jarkko Sakkinen399235d2015-09-29 00:32:19 +0300108static inline int is_itpm(struct acpi_device *dev)
Randy Dunlap1560ffe62011-08-03 16:21:11 -0700109{
110 return 0;
111}
Matthew Garrett3f0d3d02010-10-21 17:42:40 -0400112#endif
113
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600114#if defined(CONFIG_ACPI)
115#define DEVICE_IS_TPM2 1
116
117static const struct acpi_device_id tpm_acpi_tbl[] = {
118 {"MSFT0101", DEVICE_IS_TPM2},
119 {},
120};
121MODULE_DEVICE_TABLE(acpi, tpm_acpi_tbl);
122
123static int check_acpi_tpm2(struct device *dev)
124{
125 const struct acpi_device_id *aid = acpi_match_device(tpm_acpi_tbl, dev);
126 struct acpi_table_tpm2 *tbl;
127 acpi_status st;
128
129 if (!aid || aid->driver_data != DEVICE_IS_TPM2)
130 return 0;
131
132 /* If the ACPI TPM2 signature is matched then a global ACPI_SIG_TPM2
133 * table is mandatory
134 */
135 st =
136 acpi_get_table(ACPI_SIG_TPM2, 1, (struct acpi_table_header **)&tbl);
137 if (ACPI_FAILURE(st) || tbl->header.length < sizeof(*tbl)) {
138 dev_err(dev, FW_BUG "failed to get TPM2 ACPI table\n");
139 return -EINVAL;
140 }
141
142 /* The tpm2_crb driver handles this device */
143 if (tbl->start_method != ACPI_TPM2_MEMORY_MAPPED)
144 return -ENODEV;
145
146 return 0;
147}
148#else
149static int check_acpi_tpm2(struct device *dev)
150{
151 return 0;
152}
153#endif
154
Christophe Ricard1107d062016-05-19 00:35:49 +0200155static int tpm_tcg_read_bytes(struct tpm_tis_data *data, u32 addr, u16 len,
156 u8 *result)
157{
158 struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
159
160 while (len--)
161 *result++ = ioread8(phy->iobase + addr);
Azhar Shaikh5e572ca2017-06-18 19:17:59 -0700162
Christophe Ricard1107d062016-05-19 00:35:49 +0200163 return 0;
164}
165
166static int tpm_tcg_write_bytes(struct tpm_tis_data *data, u32 addr, u16 len,
Arnd Bergmannc37fbc02017-09-07 15:30:45 +0200167 const u8 *value)
Christophe Ricard1107d062016-05-19 00:35:49 +0200168{
169 struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
170
171 while (len--)
172 iowrite8(*value++, phy->iobase + addr);
Azhar Shaikh5e572ca2017-06-18 19:17:59 -0700173
Christophe Ricard1107d062016-05-19 00:35:49 +0200174 return 0;
175}
176
177static int tpm_tcg_read16(struct tpm_tis_data *data, u32 addr, u16 *result)
178{
179 struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
180
181 *result = ioread16(phy->iobase + addr);
Azhar Shaikh5e572ca2017-06-18 19:17:59 -0700182
Christophe Ricard1107d062016-05-19 00:35:49 +0200183 return 0;
184}
185
186static int tpm_tcg_read32(struct tpm_tis_data *data, u32 addr, u32 *result)
187{
188 struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
189
190 *result = ioread32(phy->iobase + addr);
Azhar Shaikh5e572ca2017-06-18 19:17:59 -0700191
Christophe Ricard1107d062016-05-19 00:35:49 +0200192 return 0;
193}
194
195static int tpm_tcg_write32(struct tpm_tis_data *data, u32 addr, u32 value)
196{
197 struct tpm_tis_tcg_phy *phy = to_tpm_tis_tcg_phy(data);
198
199 iowrite32(value, phy->iobase + addr);
Azhar Shaikh5e572ca2017-06-18 19:17:59 -0700200
Christophe Ricard1107d062016-05-19 00:35:49 +0200201 return 0;
202}
203
204static const struct tpm_tis_phy_ops tpm_tcg = {
205 .read_bytes = tpm_tcg_read_bytes,
206 .write_bytes = tpm_tcg_write_bytes,
207 .read16 = tpm_tcg_read16,
208 .read32 = tpm_tcg_read32,
209 .write32 = tpm_tcg_write32,
210};
211
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600212static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info)
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700213{
Christophe Ricard57dacc22016-05-19 00:35:48 +0200214 struct tpm_tis_tcg_phy *phy;
Christophe Ricard41a5e1c2016-05-19 00:35:52 +0200215 int irq = -1;
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600216 int rc;
217
Jerry Snitselaarb154ce12020-10-15 14:44:30 -0700218 dmi_check_system(tpm_tis_dmi_table);
219
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600220 rc = check_acpi_tpm2(dev);
221 if (rc)
222 return rc;
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700223
Christophe Ricard57dacc22016-05-19 00:35:48 +0200224 phy = devm_kzalloc(dev, sizeof(struct tpm_tis_tcg_phy), GFP_KERNEL);
225 if (phy == NULL)
Scot Doyle448e9c52014-09-24 22:41:10 +0000226 return -ENOMEM;
Jarkko Sakkinenafb5abc2014-12-12 11:46:34 -0800227
Christophe Ricard57dacc22016-05-19 00:35:48 +0200228 phy->iobase = devm_ioremap_resource(dev, &tpm_info->res);
229 if (IS_ERR(phy->iobase))
230 return PTR_ERR(phy->iobase);
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700231
Christophe Ricard41a5e1c2016-05-19 00:35:52 +0200232 if (interrupts)
233 irq = tpm_info->irq;
Stefan Berger9519de3f2011-03-30 12:13:33 -0400234
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600235 if (itpm || is_itpm(ACPI_COMPANION(dev)))
Maciej S. Szmigiero1d70fe92017-01-13 22:37:00 +0100236 phy->priv.flags |= TPM_TIS_ITPM_WORKAROUND;
Rajiv Andrade3507d612009-09-10 17:09:35 -0300237
Christophe Ricard41a5e1c2016-05-19 00:35:52 +0200238 return tpm_tis_core_init(dev, &phy->priv, irq, &tpm_tcg,
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600239 ACPI_HANDLE(dev));
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700240}
Stefan Berger96854312011-07-17 01:04:24 -0400241
Shuah Khana2fa3fb2013-09-11 14:23:13 -0700242static SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume);
243
Bill Pembertonafc6d362012-11-19 13:22:42 -0500244static int tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
Jason Gunthorpeef7b81d2016-01-07 17:36:21 -0700245 const struct pnp_device_id *pnp_id)
Kylene Jo Hall9e323d32006-07-14 00:24:31 -0700246{
Jason Gunthorpeef7b81d2016-01-07 17:36:21 -0700247 struct tpm_info tpm_info = {};
Jason Gunthorpe51dd43d2016-01-07 17:36:23 -0700248 struct resource *res;
Bjorn Helgaas7917ff92007-10-16 23:26:46 -0700249
Jason Gunthorpe51dd43d2016-01-07 17:36:23 -0700250 res = pnp_get_resource(pnp_dev, IORESOURCE_MEM, 0);
251 if (!res)
252 return -ENODEV;
253 tpm_info.res = *res;
Kylene Jo Hall9e323d32006-07-14 00:24:31 -0700254
Bjorn Helgaas7917ff92007-10-16 23:26:46 -0700255 if (pnp_irq_valid(pnp_dev, 0))
Jarkko Sakkinen399235d2015-09-29 00:32:19 +0300256 tpm_info.irq = pnp_irq(pnp_dev, 0);
Bjorn Helgaas7917ff92007-10-16 23:26:46 -0700257 else
Jason Gunthorpeef7b81d2016-01-07 17:36:21 -0700258 tpm_info.irq = -1;
Bjorn Helgaas7917ff92007-10-16 23:26:46 -0700259
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600260 return tpm_tis_init(&pnp_dev->dev, &tpm_info);
Kylene Jo Hall9e323d32006-07-14 00:24:31 -0700261}
262
Jarkko Sakkinen786a2aa2020-07-06 23:53:42 +0300263/*
264 * There is a known bug caused by 93e1b7d42e1e ("[PATCH] tpm: add HID module
265 * parameter"). This commit added IFX0102 device ID, which is also used by
266 * tpm_infineon but ignored to add quirks to probe which driver ought to be
267 * used.
268 */
269
Bill Pemberton0bbed202012-11-19 13:24:36 -0500270static struct pnp_device_id tpm_pnp_tbl[] = {
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700271 {"PNP0C31", 0}, /* TPM */
Kylene Jo Hall93e1b7d2006-04-22 02:39:52 -0700272 {"ATM1200", 0}, /* Atmel */
Jarkko Sakkinen786a2aa2020-07-06 23:53:42 +0300273 {"IFX0102", 0}, /* Infineon */
Kylene Jo Hall93e1b7d2006-04-22 02:39:52 -0700274 {"BCM0101", 0}, /* Broadcom */
LE DISEZ Erwan061991e2008-07-25 19:44:56 -0700275 {"BCM0102", 0}, /* Broadcom */
Kylene Jo Hall93e1b7d2006-04-22 02:39:52 -0700276 {"NSC1200", 0}, /* National */
Marcin Obarafb0e7e12008-07-10 17:30:42 -0700277 {"ICO0102", 0}, /* Intel */
Kylene Jo Hall93e1b7d2006-04-22 02:39:52 -0700278 /* Add new here */
279 {"", 0}, /* User Specified */
280 {"", 0} /* Terminator */
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700281};
Matt Domsch31bde712009-11-03 12:05:50 +1100282MODULE_DEVICE_TABLE(pnp, tpm_pnp_tbl);
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700283
Bill Pemberton39af33f2012-11-19 13:26:26 -0500284static void tpm_tis_pnp_remove(struct pnp_dev *dev)
Rajiv Andrade253115b2008-10-11 09:04:39 +1100285{
286 struct tpm_chip *chip = pnp_get_drvdata(dev);
Jarkko Sakkinen399235d2015-09-29 00:32:19 +0300287
Jarkko Sakkinenafb5abc2014-12-12 11:46:34 -0800288 tpm_chip_unregister(chip);
289 tpm_tis_remove(chip);
Rajiv Andrade253115b2008-10-11 09:04:39 +1100290}
291
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700292static struct pnp_driver tis_pnp_driver = {
293 .name = "tpm_tis",
294 .id_table = tpm_pnp_tbl,
295 .probe = tpm_tis_pnp_init,
Rajiv Andrade253115b2008-10-11 09:04:39 +1100296 .remove = tpm_tis_pnp_remove,
Shuah Khana2fa3fb2013-09-11 14:23:13 -0700297 .driver = {
298 .pm = &tpm_tis_pm,
299 },
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700300};
301
Jérémy Lefaure33957a12017-10-01 15:30:51 -0400302#define TIS_HID_USR_IDX (ARRAY_SIZE(tpm_pnp_tbl) - 2)
Kylene Jo Hall93e1b7d2006-04-22 02:39:52 -0700303module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id,
304 sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444);
305MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe");
Ming Lei7a192ec2009-02-06 23:40:12 +0800306
Jason Gunthorpe00194822016-01-07 17:36:24 -0700307static struct platform_device *force_pdev;
308
309static int tpm_tis_plat_probe(struct platform_device *pdev)
310{
311 struct tpm_info tpm_info = {};
312 struct resource *res;
313
314 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
315 if (res == NULL) {
316 dev_err(&pdev->dev, "no memory resource defined\n");
317 return -ENODEV;
318 }
319 tpm_info.res = *res;
320
Hans de Goede9c8c5742019-10-25 11:14:48 +0200321 tpm_info.irq = platform_get_irq_optional(pdev, 0);
Jason Gunthorpefc0e1322017-05-04 09:53:24 -0600322 if (tpm_info.irq <= 0) {
Jason Gunthorped27f81f2017-05-04 09:53:23 -0600323 if (pdev != force_pdev)
Jason Gunthorpe00194822016-01-07 17:36:24 -0700324 tpm_info.irq = -1;
325 else
326 /* When forcing auto probe the IRQ */
327 tpm_info.irq = 0;
328 }
329
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600330 return tpm_tis_init(&pdev->dev, &tpm_info);
Jason Gunthorpe00194822016-01-07 17:36:24 -0700331}
332
333static int tpm_tis_plat_remove(struct platform_device *pdev)
334{
335 struct tpm_chip *chip = dev_get_drvdata(&pdev->dev);
336
337 tpm_chip_unregister(chip);
338 tpm_tis_remove(chip);
339
340 return 0;
341}
342
Jason Gunthorpe420d4392016-11-07 15:44:31 -0700343#ifdef CONFIG_OF
344static const struct of_device_id tis_of_platform_match[] = {
345 {.compatible = "tcg,tpm-tis-mmio"},
346 {},
347};
348MODULE_DEVICE_TABLE(of, tis_of_platform_match);
349#endif
350
Ming Lei7a192ec2009-02-06 23:40:12 +0800351static struct platform_driver tis_drv = {
Jason Gunthorpe00194822016-01-07 17:36:24 -0700352 .probe = tpm_tis_plat_probe,
353 .remove = tpm_tis_plat_remove,
Ming Lei7a192ec2009-02-06 23:40:12 +0800354 .driver = {
Jarkko Sakkinenafb5abc2014-12-12 11:46:34 -0800355 .name = "tpm_tis",
Rafael J. Wysockib633f052012-07-06 19:09:20 +0200356 .pm = &tpm_tis_pm,
Jason Gunthorpe420d4392016-11-07 15:44:31 -0700357 .of_match_table = of_match_ptr(tis_of_platform_match),
Jason Gunthorpe4cb586a2017-05-04 09:53:25 -0600358 .acpi_match_table = ACPI_PTR(tpm_acpi_tbl),
Ming Lei7a192ec2009-02-06 23:40:12 +0800359 },
Kylene Jo Hall9e323d32006-07-14 00:24:31 -0700360};
361
Jason Gunthorpe00194822016-01-07 17:36:24 -0700362static int tpm_tis_force_device(void)
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700363{
Jason Gunthorpe00194822016-01-07 17:36:24 -0700364 struct platform_device *pdev;
365 static const struct resource x86_resources[] = {
366 {
367 .start = 0xFED40000,
368 .end = 0xFED40000 + TIS_MEM_LEN - 1,
369 .flags = IORESOURCE_MEM,
370 },
371 };
372
Jarkko Sakkinen399235d2015-09-29 00:32:19 +0300373 if (!force)
374 return 0;
Kylene Jo Hall9e323d32006-07-14 00:24:31 -0700375
Jason Gunthorpe00194822016-01-07 17:36:24 -0700376 /* The driver core will match the name tpm_tis of the device to
377 * the tpm_tis platform driver and complete the setup via
378 * tpm_tis_plat_probe
379 */
380 pdev = platform_device_register_simple("tpm_tis", -1, x86_resources,
381 ARRAY_SIZE(x86_resources));
382 if (IS_ERR(pdev))
383 return PTR_ERR(pdev);
384 force_pdev = pdev;
385
Wei Yongjun4fba3c32013-04-25 15:07:47 +0800386 return 0;
Jason Gunthorpe00194822016-01-07 17:36:24 -0700387}
388
389static int __init init_tis(void)
390{
391 int rc;
392
393 rc = tpm_tis_force_device();
394 if (rc)
395 goto err_force;
396
397 rc = platform_driver_register(&tis_drv);
398 if (rc)
399 goto err_platform;
400
Jason Gunthorpe00194822016-01-07 17:36:24 -0700401
402 if (IS_ENABLED(CONFIG_PNP)) {
403 rc = pnp_register_driver(&tis_pnp_driver);
404 if (rc)
405 goto err_pnp;
406 }
407
408 return 0;
409
410err_pnp:
Wei Yongjun5939eaf2017-02-07 15:51:47 +0000411 platform_driver_unregister(&tis_drv);
Jason Gunthorpe00194822016-01-07 17:36:24 -0700412err_platform:
413 if (force_pdev)
414 platform_device_unregister(force_pdev);
415err_force:
Rajiv Andrade7f2ab002010-05-13 17:37:54 -0300416 return rc;
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700417}
418
419static void __exit cleanup_tis(void)
420{
Jason Gunthorpe00194822016-01-07 17:36:24 -0700421 pnp_unregister_driver(&tis_pnp_driver);
Rajiv Andrade7f2ab002010-05-13 17:37:54 -0300422 platform_driver_unregister(&tis_drv);
Jason Gunthorpe00194822016-01-07 17:36:24 -0700423
424 if (force_pdev)
425 platform_device_unregister(force_pdev);
Leendert van Doorn27084ef2006-04-22 02:38:03 -0700426}
427
428module_init(init_tis);
429module_exit(cleanup_tis);
430MODULE_AUTHOR("Leendert van Doorn (leendert@watson.ibm.com)");
431MODULE_DESCRIPTION("TPM Driver");
432MODULE_VERSION("2.0");
433MODULE_LICENSE("GPL");