tpm: Use TPMState as a common struct
commitca75c421731d59b4a4b64d094cf2c747896c6922
authorEric Auger <eric.auger@redhat.com>
Thu, 5 Mar 2020 16:51:41 +0000 (5 17:51 +0100)
committerStefan Berger <stefanb@linux.vnet.ibm.com>
Thu, 5 Mar 2020 17:17:43 +0000 (5 12:17 -0500)
treeeaa44a263e0542c62e446d9fd65af9afa6bb52d2
parent43bc7f84e14083eda3959127a2346c0f7e31a7ae
tpm: Use TPMState as a common struct

As we plan to introduce a SysBus TPM TIS device, let's
make the TPMState a common struct usable by both the
ISADevice and the SysBusDevice. TPMStateISA embeds the
struct and inherits from the ISADevice.

The prototype of functions bound to be used by both
the ISA and SysBus devices is changed to take TPMState
handle.

A bunch of structs also are renamed to be specialized
for the ISA device. Besides those transformations, no
functional change is expected.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Stefan Berger <stefanb@linux.ibm.com>
Tested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Message-id: 20200305165149.618-3-eric.auger@redhat.com
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
hw/tpm/tpm_tis.c