Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192437
b: refs/heads/master
c: b89e66e
h: refs/heads/master
i:
  192435: dd773d6
v: v3
  • Loading branch information
Rajiv Andrade authored and James Morris committed May 4, 2010
1 parent 5cddc32 commit 3b4e928
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fcaaade1db63bb2d6f7611d7824eb50d2f07a546
refs/heads/master: b89e66e1e396f7b5436af154e58209320cc08aed
14 changes: 11 additions & 3 deletions trunk/drivers/char/tpm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,28 @@ menuconfig TCG_TPM
obtained at: <http://sourceforge.net/projects/trousers>. To
compile this driver as a module, choose M here; the module
will be called tpm. If unsure, say N.
Note: For more TPM drivers enable CONFIG_PNP, CONFIG_ACPI
and CONFIG_PNPACPI.
Note: For more TPM drivers and BIOS LOG access enable
CONFIG_PNP, CONFIG_ACPI and CONFIG_PNPACPI.

if TCG_TPM

config TCG_TIS
tristate "TPM Interface Specification 1.2 Interface"
depends on PNP
---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
from within Linux. To compile this driver as a module, choose
M here; the module will be called tpm_tis.

config TCG_BIOS_LOG
bool "TPM bios mesurement log"
depends on X86
select ACPI
---help---
ACPI is required for access to bios measurements lists and therefore
to validate the PCR[0] value. So say Yes in case you want this
feature and, consequently, ACPI will be enabled.

config TCG_NSC
tristate "National Semiconductor TPM Interface"
---help---
Expand Down
40 changes: 21 additions & 19 deletions trunk/drivers/char/tpm/tpm_tis.c
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ static int tpm_tis_init(struct device *dev, resource_size_t start,
tpm_remove_hardware(chip->dev);
return rc;
}

#ifdef CONFIG_PNP
static int __devinit tpm_tis_pnp_init(struct pnp_dev *pnp_dev,
const struct pnp_device_id *pnp_id)
{
Expand Down Expand Up @@ -662,7 +662,7 @@ static struct pnp_driver tis_pnp_driver = {
module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id,
sizeof(tpm_pnp_tbl[TIS_HID_USR_IDX].id), 0444);
MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe");

#endif
static int tpm_tis_suspend(struct platform_device *dev, pm_message_t msg)
{
return tpm_pm_suspend(&dev->dev, msg);
Expand All @@ -689,21 +689,21 @@ MODULE_PARM_DESC(force, "Force device probe rather than using ACPI entry");
static int __init init_tis(void)
{
int rc;
#ifdef CONFIG_PNP
if (!force)
return pnp_register_driver(&tis_pnp_driver);
#endif

if (force) {
rc = platform_driver_register(&tis_drv);
if (rc < 0)
return rc;
if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0)))
return PTR_ERR(pdev);
if((rc=tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0)) != 0) {
platform_device_unregister(pdev);
platform_driver_unregister(&tis_drv);
}
rc = platform_driver_register(&tis_drv);
if (rc < 0)
return rc;
if (IS_ERR(pdev=platform_device_register_simple("tpm_tis", -1, NULL, 0)))
return PTR_ERR(pdev);
if((rc=tpm_tis_init(&pdev->dev, TIS_MEM_BASE, TIS_MEM_LEN, 0)) != 0) {
platform_device_unregister(pdev);
platform_driver_unregister(&tis_drv);
}

return pnp_register_driver(&tis_pnp_driver);
return rc;
}

static void __exit cleanup_tis(void)
Expand All @@ -727,12 +727,14 @@ static void __exit cleanup_tis(void)
list_del(&i->list);
}
spin_unlock(&tis_lock);

if (force) {
platform_device_unregister(pdev);
platform_driver_unregister(&tis_drv);
} else
#ifdef CONFIG_PNP
if (!force) {
pnp_unregister_driver(&tis_pnp_driver);
return;
}
#endif
platform_device_unregister(pdev);
platform_driver_unregister(&tis_drv);
}

module_init(init_tis);
Expand Down

0 comments on commit 3b4e928

Please sign in to comment.