summaryrefslogtreecommitdiff
path: root/src/drivers/i2c/tpm/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/i2c/tpm/Makefile.inc')
-rw-r--r--src/drivers/i2c/tpm/Makefile.inc30
1 files changed, 10 insertions, 20 deletions
diff --git a/src/drivers/i2c/tpm/Makefile.inc b/src/drivers/i2c/tpm/Makefile.inc
index 51856fa9f0..ae50f2b342 100644
--- a/src/drivers/i2c/tpm/Makefile.inc
+++ b/src/drivers/i2c/tpm/Makefile.inc
@@ -1,25 +1,15 @@
-ramstage-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-romstage-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-verstage-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-bootblock-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-postcar-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
+ifeq ($(CONFIG_TPM)$(CONFIG_I2C_TPM),yy)
-ramstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
-romstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
-verstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
-bootblock-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
-postcar-$(CONFIG_MAINBOARD_HAS_I2C_TPM_ATMEL) += tis_atmel.c
+all-$(CONFIG_DRIVER_TIS_DEFAULT) += tis.c
-ramstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
-romstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
-verstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
-bootblock-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
-postcar-$(CONFIG_MAINBOARD_HAS_I2C_TPM_GENERIC) += tpm.c
+ifeq ($(CONFIG_TPM_ATMEL),y)
+all-y += tis_atmel.c
+else ifeq ($(CONFIG_TPM_GOOGLE),y)
+all-y += cr50.c
+else
+all-y += tpm.c
+endif
-ramstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
-romstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
-verstage-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
-bootblock-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
-postcar-$(CONFIG_MAINBOARD_HAS_I2C_TPM_CR50) += cr50.c
+endif
ramstage-$(CONFIG_DRIVER_I2C_TPM_ACPI) += chip.c