diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2020-05-29 19:42:07 +0300 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2020-07-05 11:32:17 +0000 |
commit | 9cc6493e8f6b63e77564ff0ce2ea72da8e876c96 (patch) | |
tree | 20b9ad5b9ef7d59352fe2eb0cecc3c7344297683 /src/drivers | |
parent | 1be23b073308ae531fd00f18340869e2a293dbdd (diff) | |
download | coreboot-9cc6493e8f6b63e77564ff0ce2ea72da8e876c96.tar.xz |
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')
-rw-r--r-- | src/drivers/pc80/tpm/tis.c | 5 |
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 = { |