Message ID | 20200617142305.1198672-5-stefanb@linux.vnet.ibm.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | tpm: Enable usage of TPM TIS with interrupts | expand |
Hi Stefan, On 6/17/20 4:23 PM, Stefan Berger wrote: > Before the enablement of interrupts on PCs, split the TPM_TIS_IRQ > into TPM_TIS_ISA_IRQ for PCs and TPM_TIS_SYSBUS_IRQ for ARM. > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com> > Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> > Message-id: 20200616205721.1191408-5-stefanb@linux.vnet.ibm.com Reviewed-by: Eric Auger <eric.auger@redhat.com> Thanks Eric > --- > hw/tpm/tpm_tis_isa.c | 2 +- > hw/tpm/tpm_tis_sysbus.c | 3 ++- > include/hw/acpi/tpm.h | 3 ++- > 3 files changed, 5 insertions(+), 3 deletions(-) > > diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c > index ed6d422f05..27222a9a49 100644 > --- a/hw/tpm/tpm_tis_isa.c > +++ b/hw/tpm/tpm_tis_isa.c > @@ -97,7 +97,7 @@ static void tpm_tis_isa_reset(DeviceState *dev) > } > > static Property tpm_tis_isa_properties[] = { > - DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_IRQ), > + DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_ISA_IRQ), > DEFINE_PROP_TPMBE("tpmdev", TPMStateISA, state.be_driver), > DEFINE_PROP_BOOL("ppi", TPMStateISA, state.ppi_enabled, true), > DEFINE_PROP_END_OF_LIST(), > diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c > index 86b3988be5..bf4583c3f6 100644 > --- a/hw/tpm/tpm_tis_sysbus.c > +++ b/hw/tpm/tpm_tis_sysbus.c > @@ -97,7 +97,8 @@ static void tpm_tis_sysbus_reset(DeviceState *dev) > } > > static Property tpm_tis_sysbus_properties[] = { > - DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, TPM_TIS_IRQ), > + DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, > + TPM_TIS_SYSBUS_IRQ), > DEFINE_PROP_TPMBE("tpmdev", TPMStateSysBus, state.be_driver), > DEFINE_PROP_BOOL("ppi", TPMStateSysBus, state.ppi_enabled, false), > DEFINE_PROP_END_OF_LIST(), > diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h > index 1a2a57a21f..d5caee9771 100644 > --- a/include/hw/acpi/tpm.h > +++ b/include/hw/acpi/tpm.h > @@ -24,7 +24,8 @@ > #define TPM_TIS_ADDR_BASE 0xFED40000 > #define TPM_TIS_ADDR_SIZE 0x5000 > > -#define TPM_TIS_IRQ 5 > +#define TPM_TIS_ISA_IRQ 5 > +#define TPM_TIS_SYSBUS_IRQ 5 > > #define TPM_TIS_NUM_LOCALITIES 5 /* per spec */ > #define TPM_TIS_LOCALITY_SHIFT 12 >
diff --git a/hw/tpm/tpm_tis_isa.c b/hw/tpm/tpm_tis_isa.c index ed6d422f05..27222a9a49 100644 --- a/hw/tpm/tpm_tis_isa.c +++ b/hw/tpm/tpm_tis_isa.c @@ -97,7 +97,7 @@ static void tpm_tis_isa_reset(DeviceState *dev) } static Property tpm_tis_isa_properties[] = { - DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_IRQ), + DEFINE_PROP_UINT32("irq", TPMStateISA, state.irq_num, TPM_TIS_ISA_IRQ), DEFINE_PROP_TPMBE("tpmdev", TPMStateISA, state.be_driver), DEFINE_PROP_BOOL("ppi", TPMStateISA, state.ppi_enabled, true), DEFINE_PROP_END_OF_LIST(), diff --git a/hw/tpm/tpm_tis_sysbus.c b/hw/tpm/tpm_tis_sysbus.c index 86b3988be5..bf4583c3f6 100644 --- a/hw/tpm/tpm_tis_sysbus.c +++ b/hw/tpm/tpm_tis_sysbus.c @@ -97,7 +97,8 @@ static void tpm_tis_sysbus_reset(DeviceState *dev) } static Property tpm_tis_sysbus_properties[] = { - DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, TPM_TIS_IRQ), + DEFINE_PROP_UINT32("irq", TPMStateSysBus, state.irq_num, + TPM_TIS_SYSBUS_IRQ), DEFINE_PROP_TPMBE("tpmdev", TPMStateSysBus, state.be_driver), DEFINE_PROP_BOOL("ppi", TPMStateSysBus, state.ppi_enabled, false), DEFINE_PROP_END_OF_LIST(), diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h index 1a2a57a21f..d5caee9771 100644 --- a/include/hw/acpi/tpm.h +++ b/include/hw/acpi/tpm.h @@ -24,7 +24,8 @@ #define TPM_TIS_ADDR_BASE 0xFED40000 #define TPM_TIS_ADDR_SIZE 0x5000 -#define TPM_TIS_IRQ 5 +#define TPM_TIS_ISA_IRQ 5 +#define TPM_TIS_SYSBUS_IRQ 5 #define TPM_TIS_NUM_LOCALITIES 5 /* per spec */ #define TPM_TIS_LOCALITY_SHIFT 12