summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/pc80/tpm/tis.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c
index f922714381..d811c52e90 100644
--- a/src/drivers/pc80/tpm/tis.c
+++ b/src/drivers/pc80/tpm/tis.c
@@ -905,11 +905,16 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
- if (CONFIG(TPM))
- pnp_enable_devices(dev, &lpc_tpm_ops,
- ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
- else
+ if (CONFIG(TPM)) {
+ if (pc80_tis_probe(NULL) == NULL) {
+ dev->enabled = 0;
+ return;
+ }
+
+ pnp_enable_devices(dev, &lpc_tpm_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
+ } else {
pnp_enable_devices(dev, &noop_tpm_ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
+ }
}
struct chip_operations drivers_pc80_tpm_ops = {