summaryrefslogtreecommitdiff
path: root/src/southbridge/amd
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2017-04-13 17:08:18 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2017-04-17 23:33:09 +0200
commit0f3a18ad28b3d44e57806e5d77f15f04acd05543 (patch)
tree945fb528273de8dbc46d811bf38ef1eed60d2e36 /src/southbridge/amd
parent79a27ac8b810e15509ec5656fa4b44b906f09385 (diff)
downloadcoreboot-0f3a18ad28b3d44e57806e5d77f15f04acd05543.tar.xz
[nb|sb]/amd/[amdfam10|sb700]: Add LPC bridge ACPI names for NB/SB
Adds the necessary plumbing for acpi_device_path() to find the LPC bridge on the AMD Family10h/15h northbridges and SB700 southbridge. This is necessary for TPM support since the acpi path to the LPC bridge doesn't match the built-in default in tpm.c This is a port of GIT hash d8a2c1fb by Tobias Diedrich. BUG=https://ticket.coreboot.org/issues/102 Change-Id: I1c514e335e194b2864599e5419cfaee830b94e38 Signed-off-by: Timothy Pearson <tpearson@raptorengineering.com> Reviewed-on: https://review.coreboot.org/19282 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/southbridge/amd')
-rw-r--r--src/southbridge/amd/sb700/lpc.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/southbridge/amd/sb700/lpc.c b/src/southbridge/amd/sb700/lpc.c
index 7b53820e0f..8270f8a450 100644
--- a/src/southbridge/amd/sb700/lpc.c
+++ b/src/southbridge/amd/sb700/lpc.c
@@ -271,6 +271,17 @@ static void southbridge_acpi_fill_ssdt_generator(device_t device) {
amd_generate_powernow(ACPI_CPU_CONTROL, 6, 1);
}
+static const char *lpc_acpi_name(struct device *dev) {
+ if (dev->path.type != DEVICE_PATH_PCI)
+ return NULL;
+
+ switch (dev->path.pci.devfn) {
+ case PCI_DEVFN(0x14, 3):
+ return "LPC";
+ }
+
+ return NULL;
+}
#endif
@@ -283,7 +294,8 @@ static struct device_operations lpc_ops = {
.set_resources = sb700_lpc_set_resources,
.enable_resources = sb700_lpc_enable_resources,
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
- .write_acpi_tables = acpi_write_hpet,
+ .acpi_name = lpc_acpi_name,
+ .write_acpi_tables = acpi_write_hpet,
.acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator,
#endif
.init = lpc_init,