summaryrefslogtreecommitdiff
path: root/src/drivers/pc80
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2020-05-29 19:42:07 +0300
committerNico Huber <nico.h@gmx.de>2020-07-05 11:32:17 +0000
commit9cc6493e8f6b63e77564ff0ce2ea72da8e876c96 (patch)
tree20b9ad5b9ef7d59352fe2eb0cecc3c7344297683 /src/drivers/pc80
parent1be23b073308ae531fd00f18340869e2a293dbdd (diff)
drivers/pc80/tpm: Remove support code if TPM is disabled
Change-Id: I7015d4bf6f536c5cea8e1174db81f09f756ae0e5 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/41873 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Christian Walter <christian.walter@9elements.com> Reviewed-by: Michael Niewöhner
Diffstat (limited to 'src/drivers/pc80')
-rw-r--r--src/drivers/pc80/tpm/tis.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/pc80/tpm/tis.c b/src/drivers/pc80/tpm/tis.c
index 4fbb09eba4..27d238ce75 100644
--- a/src/drivers/pc80/tpm/tis.c
+++ b/src/drivers/pc80/tpm/tis.c
@@ -993,8 +993,9 @@ static struct pnp_info pnp_dev_info[] = {
static void enable_dev(struct device *dev)
{
- pnp_enable_devices(dev, &lpc_tpm_ops,
- ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
+ if (CONFIG(TPM1) || CONFIG(TPM2))
+ pnp_enable_devices(dev, &lpc_tpm_ops,
+ ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
}
struct chip_operations drivers_pc80_tpm_ops = {