From mboxrd@z Thu Jan 1 00:00:00 1970 From: Miquel Raynal Date: Thu, 19 Jul 2018 22:35:05 +0200 Subject: [U-Boot] [PATCH v2 0/7] Allow both TPM stacks to be compiled at the same time Message-ID: <20180719203512.346-1-miquel.raynal@bootlin.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: u-boot@lists.denx.de It was first decided that the user would choose the TPM version (1.x or 2.x) that he wants to use at compile time. After some time the decision has been made to change this and allow both stacks (and drivers) to be compiled at the same time. The primary benefit would be to be able to compile the maximum of code with only one Sandbox configuration. This series removes this limitation by creating a 'tpm2' command (instead of two commands named 'tpm'). While test suites must be updated to use 'tpm2' instead of 'tpm' (in case both stacks are compiled), the user will not have to change anything as U-Boot prompt will find the closest matching command by default. In the TPM private data a version entry is added, updated by TPMv2 drivers in the ->set_version() hook added in the uclass. This has been tested with the tpm2.py test suite on Sandbox with either only the V1, only the V2 and with both versions selected. Thanks, Miqu=C3=A8l Changes since v1: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D * Added Simon's Reviewed-by tags. * Added a patch to remove TPM_DRIVER_SELECTED stale symbol from Kconfig. * s/int rc/int ret/ * Removed conditionals from the code. * Moved the TPM stack version selection in the probe, removed the ->set_version() helper. Miquel Raynal (7): tpm: fix typo in kernel doc tpm: compile Sandbox driver by default tpm: remove stale symbol in Kconfig tpm: allow TPM v1 and v2 to be compiled at the same time test/py: tpm2: switch from 'tpm' to 'tpm2' command tpm: make TPM_V2 be compiled by default sandbox: compile both TPM stack versions and drivers cmd/tpm-common.c | 24 +++++++++++++++++++++++- cmd/tpm-v1.c | 2 +- cmd/tpm-v2.c | 4 ++-- configs/sandbox_defconfig | 3 +++ drivers/tpm/Kconfig | 13 +++++-------- drivers/tpm/tpm-uclass.c | 3 --- drivers/tpm/tpm2_tis_sandbox.c | 3 +++ drivers/tpm/tpm2_tis_spi.c | 4 ++++ include/tpm-common.h | 42 +++++++++++++++++++++++++++++++++++---= ---- test/py/tests/test_tpm2.py | 40 ++++++++++++++++++++------------------= -- 10 files changed, 96 insertions(+), 42 deletions(-) --=20 2.14.1