drivers/amd/ftpm: Fix compilation
The function tlcl2_get_capability() is only linked when Kconfig TPM2 is being selected. Add a guard to not include the SMBIOS code when TPM2 isn't selected. TEST=Can compile the fTPM driver when TPM2 isn't selected. Change-Id: I9385f15fc71c021f9be2bfb874898f76fa71fee4 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/91775 Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
ab63331423
commit
ff7bc7d2d1
1 changed files with 2 additions and 2 deletions
|
|
@ -111,7 +111,7 @@ static const char *crb_tpm_acpi_name(const struct device *dev)
|
|||
return "TPM2";
|
||||
}
|
||||
|
||||
#if CONFIG(GENERATE_SMBIOS_TABLES)
|
||||
#if CONFIG(GENERATE_SMBIOS_TABLES) && CONFIG(TPM2)
|
||||
static tpm_result_t tpm_get_cap(uint32_t property, uint32_t *value)
|
||||
{
|
||||
TPMS_CAPABILITY_DATA cap_data;
|
||||
|
|
@ -188,7 +188,7 @@ static struct device_operations __maybe_unused amd_crb_ops = {
|
|||
.acpi_name = crb_tpm_acpi_name,
|
||||
.acpi_fill_ssdt = crb_tpm_fill_ssdt,
|
||||
#endif
|
||||
#if CONFIG(GENERATE_SMBIOS_TABLES)
|
||||
#if CONFIG(GENERATE_SMBIOS_TABLES) && CONFIG(TPM2)
|
||||
.get_smbios_data = smbios_write_type43_tpm,
|
||||
#endif
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue