u-boot/drivers/tpm
Miquel Raynal 2a2096ea60 tpm: allow TPM v1 and v2 to be compiled at the same time
While there is probably no reason to do so in a real life situation, it
will allow to compile test both stacks with the same sandbox defconfig.

As we cannot define two 'tpm' commands at the same time, the command for
TPM v1 is still called 'tpm' and the one for TPM v2 'tpm2'. While this
is the exact command name that must be written into eg. test files, any
user already using the TPM v2 stack can continue to do so by just writing
'tpm' because as long as TPM v1 support is not compiled, U-Boot prompt
will search for the closest command named after 'tpm'.

The command set can also be changed at runtime (not supported yet, but
ready to be), but as one can compile only either one stack or the other,
there is still one spot in the code where conditionals are used: to
retrieve the v1 or v2 command set.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: In sandbox_tpm2_fill_buf() use NULL not \0 to ensure NULL
terminated string due to LLVM warning]
Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-28 11:57:38 -04:00
..
Kconfig tpm: allow TPM v1 and v2 to be compiled at the same time 2018-07-28 11:57:38 -04:00
Makefile tpm: add a Sandbox TPMv2.x driver 2018-05-25 20:13:00 -04:00
tpm-uclass.c tpm: allow TPM v1 and v2 to be compiled at the same time 2018-07-28 11:57:38 -04:00
tpm2_tis_sandbox.c tpm: allow TPM v1 and v2 to be compiled at the same time 2018-07-28 11:57:38 -04:00
tpm2_tis_spi.c tpm: allow TPM v1 and v2 to be compiled at the same time 2018-07-28 11:57:38 -04:00
tpm_atmel_twi.c tpm: disociate TPMv1.x specific and generic code 2018-05-25 20:12:55 -04:00
tpm_internal.h SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
tpm_tis.h tpm: add Revision ID field in the chip structure 2018-05-25 08:12:40 -04:00
tpm_tis_infineon.c tpm: disociate TPMv1.x specific and generic code 2018-05-25 20:12:55 -04:00
tpm_tis_lpc.c tpm: disociate TPMv1.x specific and generic code 2018-05-25 20:12:55 -04:00
tpm_tis_sandbox.c tpm: disociate TPMv1.x specific and generic code 2018-05-25 20:12:55 -04:00
tpm_tis_st33zp24_i2c.c tpm: disociate TPMv1.x specific and generic code 2018-05-25 20:12:55 -04:00
tpm_tis_st33zp24_spi.c tpm: disociate TPMv1.x specific and generic code 2018-05-25 20:12:55 -04:00