From 466d8ce18e71eb05f2e858c865b656367c000513 Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Tue, 12 Dec 2017 17:25:15 -0800 Subject: [PATCH] drivers/pc80/tpm: Remove unused ACPI opregion The opregion and fields are left over from when ACPI ASL code was reading registers to determine the current setup. Now that the ACPI device is generated with the correct information already this code is not used at all and can be removed from the tree. Change-Id: If89d90cc7105ed21e2134ac99224f6f8214cc8ad Signed-off-by: Duncan Laurie Reviewed-on: https://review.coreboot.org/22854 Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel --- src/drivers/pc80/tpm/tpm.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/src/drivers/pc80/tpm/tpm.c b/src/drivers/pc80/tpm/tpm.c index c0afd4cdad..574d3af6ff 100644 --- a/src/drivers/pc80/tpm/tpm.c +++ b/src/drivers/pc80/tpm/tpm.c @@ -872,8 +872,6 @@ static void lpc_tpm_fill_ssdt(struct device *dev) { const char *path = acpi_device_path(dev->bus->dev); u32 arg; - struct opregion opreg = OPREGION("TREG", SYSTEMMEMORY, - CONFIG_TPM_TIS_BASE_ADDRESS, 0x5000); if (!path) { path = "\\_SB_.PCI0.LPCB"; @@ -892,33 +890,6 @@ static void lpc_tpm_fill_ssdt(struct device *dev) acpigen_write_name_integer("_UID", 1); - acpigen_write_opregion(&opreg); - - struct fieldlist tpm_field_list[] = { - /* - * TPM_INT_ENABLE_0 - * bit 0 : dataAvailIntEnable, - * bit 1 : stsValidIntEnable, - * bit 2 : localityChangeIntEnable, - * bit 3:4 typePolarity. - */ - FIELDLIST_OFFSET(0x8), - FIELDLIST_NAMESTR("INTE", 3), - FIELDLIST_NAMESTR("ITPL", 2), - - /* TPM_INT_VECTOR_0 */ - FIELDLIST_OFFSET(0xC), - FIELDLIST_NAMESTR("IVEC", 4), - - /* TPM_DID_VID */ - FIELDLIST_OFFSET(0xf00), - FIELDLIST_NAMESTR("DVID", 32), - }; - - acpigen_write_field(opreg.name, tpm_field_list, - ARRAY_SIZE(tpm_field_list), - FIELD_BYTEACC | FIELD_NOLOCK | FIELD_PRESERVE); - u32 did_vid = tpm_read_did_vid(0); if (did_vid > 0 && did_vid < 0xffffffff) acpigen_write_STA(ACPI_STATUS_DEVICE_ALL_ON);