summaryrefslogtreecommitdiff
path: root/src/southbridge/nvidia
diff options
context:
space:
mode:
Diffstat (limited to 'src/southbridge/nvidia')
-rw-r--r--src/southbridge/nvidia/ck804/ht.c27
-rw-r--r--src/southbridge/nvidia/ck804/lpc.c7
-rw-r--r--src/southbridge/nvidia/mcp55/ht.c9
-rw-r--r--src/southbridge/nvidia/mcp55/lpc.c19
4 files changed, 62 insertions, 0 deletions
diff --git a/src/southbridge/nvidia/ck804/ht.c b/src/southbridge/nvidia/ck804/ht.c
index a2ba2957be..6ef39e3e27 100644
--- a/src/southbridge/nvidia/ck804/ht.c
+++ b/src/southbridge/nvidia/ck804/ht.c
@@ -24,6 +24,33 @@
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include "ck804.h"
+#include <arch/acpi.h>
+
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLES)
+
+unsigned long acpi_fill_mcfg(unsigned long current)
+{
+ device_t dev;
+ unsigned long mcfg_base;
+
+ dev = dev_find_slot(0x0, PCI_DEVFN(0x0,0));
+ if (!dev)
+ return current;
+
+ mcfg_base = pci_read_config16(dev, 0x90);
+ if ((mcfg_base & 0x1000) == 0)
+ return current;
+
+ mcfg_base = (mcfg_base & 0xf) << 28;
+
+ printk(BIOS_INFO, "mcfg_base %lx.\n", mcfg_base);
+
+ current += acpi_create_mcfg_mmconfig((acpi_mcfg_mmconfig_t *)
+ current, mcfg_base, 0x0, 0x0, 0xff);
+ return current;
+}
+
+#endif
static struct device_operations ht_ops = {
.read_resources = pci_dev_read_resources,
diff --git a/src/southbridge/nvidia/ck804/lpc.c b/src/southbridge/nvidia/ck804/lpc.c
index b3a9b00bc0..a935cee8a0 100644
--- a/src/southbridge/nvidia/ck804/lpc.c
+++ b/src/southbridge/nvidia/ck804/lpc.c
@@ -30,6 +30,7 @@
#include <pc80/isa-dma.h>
#include <arch/io.h>
#include <arch/ioapic.h>
+#include <arch/acpi.h>
#include <cpu/x86/lapic.h>
#include <stdlib.h>
#include <assert.h>
@@ -316,6 +317,9 @@ static struct device_operations lpc_ops = {
.read_resources = ck804_lpc_read_resources,
.set_resources = ck804_lpc_set_resources,
.enable_resources = ck804_lpc_enable_resources,
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLES)
+ .write_acpi_tables = acpi_write_hpet,
+#endif
.init = lpc_init,
.scan_bus = scan_static_bus,
// .enable = ck804_enable,
@@ -345,6 +349,9 @@ static struct device_operations lpc_slave_ops = {
.read_resources = ck804_lpc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLES)
+ .write_acpi_tables = acpi_write_hpet,
+#endif
.init = lpc_slave_init,
// .enable = ck804_enable,
.ops_pci = &ck804_pci_ops,
diff --git a/src/southbridge/nvidia/mcp55/ht.c b/src/southbridge/nvidia/mcp55/ht.c
index 633221c5d6..2daa5bbdfc 100644
--- a/src/southbridge/nvidia/mcp55/ht.c
+++ b/src/southbridge/nvidia/mcp55/ht.c
@@ -26,8 +26,17 @@
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
+#include <arch/acpi.h>
#include "mcp55.h"
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLES)
+unsigned long acpi_fill_mcfg(unsigned long current)
+{
+ /* Not implemented */
+ return current;
+}
+#endif
+
static struct device_operations ht_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
diff --git a/src/southbridge/nvidia/mcp55/lpc.c b/src/southbridge/nvidia/mcp55/lpc.c
index 585232d712..312348c1fa 100644
--- a/src/southbridge/nvidia/mcp55/lpc.c
+++ b/src/southbridge/nvidia/mcp55/lpc.c
@@ -34,7 +34,13 @@
#include <arch/io.h>
#include <arch/ioapic.h>
#include <cpu/x86/lapic.h>
+#include <arch/acpi.h>
#include <stdlib.h>
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLES)
+#include <arch/acpi.h>
+#include <arch/acpigen.h>
+#endif
+#include <cpu/amd/model_fxx_powernow.h>
#include "mcp55.h"
#define NMI_OFF 0
@@ -275,10 +281,23 @@ static const struct pci_driver lpc_driver __pci_driver = {
.devices = lpc_ids,
};
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLES) && IS_ENABLED(CONFIG_PER_DEVICE_ACPI_TABLES)
+
+static void southbridge_acpi_fill_ssdt_generator(void)
+{
+ amd_model_fxx_generate_powernow(0, 0, 0);
+}
+
+#endif
+
static struct device_operations lpc_slave_ops = {
.read_resources = mcp55_lpc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
+#if IS_ENABLED(CONFIG_GENERATE_ACPI_TABLES) && IS_ENABLED(CONFIG_PER_DEVICE_ACPI_TABLES)
+ .acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator,
+ .write_acpi_tables = acpi_write_hpet,
+#endif
.init = lpc_slave_init,
// .enable = mcp55_enable,
.ops_pci = &mcp55_pci_ops,