[coreboot-gerrit] Change in coreboot[master]: [nb|sb]/amd/[amdfam10|sb700]: Add LPC bridge ACPI names for ...
Timothy Pearson (Code Review)
gerrit at coreboot.org
Fri Apr 14 00:12:25 CEST 2017
Timothy Pearson has uploaded a new change for review. ( https://review.coreboot.org/19282 )
Change subject: [nb|sb]/amd/[amdfam10|sb700]: Add LPC bridge ACPI names for NB/SB
......................................................................
[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.
Change-Id: I1c514e335e194b2864599e5419cfaee830b94e38
Signed-off-by: Timothy Pearson <tpearson at raptorengineering.com>
---
M src/northbridge/amd/amdfam10/northbridge.c
M src/southbridge/amd/sb700/lpc.c
2 files changed, 24 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/19282/1
diff --git a/src/northbridge/amd/amdfam10/northbridge.c b/src/northbridge/amd/amdfam10/northbridge.c
index c23f04f..a306d25 100644
--- a/src/northbridge/amd/amdfam10/northbridge.c
+++ b/src/northbridge/amd/amdfam10/northbridge.c
@@ -2,7 +2,7 @@
* This file is part of the coreboot project.
*
* Copyright (C) 2016 Damien Zammit <damien at zamaudio.com>
- * Copyright (C) 2015 Timothy Pearson <tpearson at raptorengineeringinc.com>, Raptor Engineering
+ * Copyright (C) 2015 - 2017 Timothy Pearson <tpearson at raptorengineering.com>, Raptor Engineering
* Copyright (C) 2007 Advanced Micro Devices, Inc.
*
* This program is free software; you can redistribute it and/or modify
@@ -644,6 +644,13 @@
{
}
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+static const char *amdfam10_northbridge_acpi_name(struct device *dev)
+{
+ return "";
+}
+#endif
+
static struct device_operations northbridge_operations = {
.read_resources = amdfam10_read_resources,
.set_resources = amdfam10_set_resources,
@@ -653,6 +660,7 @@
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
.write_acpi_tables = northbridge_write_acpi_tables,
.acpi_fill_ssdt_generator = northbridge_acpi_write_vars,
+ .acpi_name = amdfam10_northbridge_acpi_name,
#endif
.enable = 0,
.ops_pci = 0,
@@ -1302,6 +1310,16 @@
}
#endif
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+static const char *amdfam10_domain_acpi_name(struct device *dev)
+{
+ if (dev->path.type == DEVICE_PATH_DOMAIN)
+ return "PCI0";
+
+ return NULL;
+}
+#endif
+
static struct device_operations pci_domain_ops = {
.read_resources = amdfam10_domain_read_resources,
.set_resources = amdfam10_domain_set_resources,
@@ -1309,6 +1327,9 @@
.init = NULL,
.scan_bus = amdfam10_domain_scan_bus,
.ops_pci_bus = pci_bus_default_ops,
+#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
+ .acpi_name = amdfam10_domain_acpi_name,
+#endif
#if CONFIG_GENERATE_SMBIOS_TABLES
.get_smbios_data = amdfam10_get_smbios_data,
#endif
diff --git a/src/southbridge/amd/sb700/lpc.c b/src/southbridge/amd/sb700/lpc.c
index 7b53820..cdbdb33 100644
--- a/src/southbridge/amd/sb700/lpc.c
+++ b/src/southbridge/amd/sb700/lpc.c
@@ -270,7 +270,6 @@
static void southbridge_acpi_fill_ssdt_generator(device_t device) {
amd_generate_powernow(ACPI_CPU_CONTROL, 6, 1);
}
-
#endif
@@ -283,7 +282,8 @@
.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,
--
To view, visit https://review.coreboot.org/19282
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c514e335e194b2864599e5419cfaee830b94e38
Gerrit-PatchSet: 1
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Owner: Timothy Pearson <tpearson at raptorengineering.com>
More information about the coreboot-gerrit
mailing list