Skip to content

Commit 41a5e1c

Browse files
cricard13Jarkko Sakkinen
authored andcommitted
tpm/tpm_tis: Split tpm_tis driver into a core and TCG TIS compliant phy
To avoid code duplication between the old tpm_tis and the new and future native tcg tis driver(ie: spi, i2c...), the tpm_tis driver was reworked, so that all common logic is extracted and can be reused from all drivers. The core methods can also be used from other TIS like drivers. itpm workaround is now managed with a specific tis flag TPM_TIS_ITPM_POSSIBLE. This commit is based on the initial work by Peter Huewe. Signed-off-by: Peter Huewe <peter.huewe@infineon.com> Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
1 parent 92eb0f7 commit 41a5e1c

File tree

5 files changed

+958
-882
lines changed

5 files changed

+958
-882
lines changed

drivers/char/tpm/Kconfig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,16 @@ menuconfig TCG_TPM
2424

2525
if TCG_TPM
2626

27+
config TCG_TIS_CORE
28+
tristate
29+
---help---
30+
TCG TIS TPM core driver. It implements the TPM TCG TIS logic and hooks
31+
into the TPM kernel APIs. Physical layers will register against it.
32+
2733
config TCG_TIS
2834
tristate "TPM Interface Specification 1.2 Interface / TPM 2.0 FIFO Interface"
2935
depends on X86
36+
select TCG_TIS_CORE
3037
---help---
3138
If you have a TPM security chip that is compliant with the
3239
TCG TIS 1.2 TPM specification (TPM1.2) or the TCG PTP FIFO

drivers/char/tpm/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ ifdef CONFIG_TCG_IBMVTPM
1212
tpm-y += tpm_eventlog.o tpm_of.o
1313
endif
1414
endif
15+
obj-$(CONFIG_TCG_TIS_CORE) += tpm_tis_core.o
1516
obj-$(CONFIG_TCG_TIS) += tpm_tis.o
1617
obj-$(CONFIG_TCG_TIS_I2C_ATMEL) += tpm_i2c_atmel.o
1718
obj-$(CONFIG_TCG_TIS_I2C_INFINEON) += tpm_i2c_infineon.o

0 commit comments

Comments
 (0)