diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-10-08 19:25:57 +0300 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-11-23 18:34:19 +0000 |
commit | f3758b6738d2968980309257197ef4f1977dc974 (patch) | |
tree | ab5425987a3c8ed8f054a6c8407029d3ecb28d0c /src/southbridge/amd/agesa/hudson/lpc.c | |
parent | 27cb3e0d31275e702e34a2085f9cf248b742d3cf (diff) | |
download | coreboot-f3758b6738d2968980309257197ef4f1977dc974.tar.xz |
AGESA,binaryPI: Move SCI enable outside table creation
Preferably, coreboot tables creation is kept hardware-invariant.
Change-Id: I37810771090dd9b0377f9a72c7a17ef1564ccf68
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36812
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/southbridge/amd/agesa/hudson/lpc.c')
-rw-r--r-- | src/southbridge/amd/agesa/hudson/lpc.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/southbridge/amd/agesa/hudson/lpc.c b/src/southbridge/amd/agesa/hudson/lpc.c index 4cfbb6487e..eed1aec2e3 100644 --- a/src/southbridge/amd/agesa/hudson/lpc.c +++ b/src/southbridge/amd/agesa/hudson/lpc.c @@ -23,6 +23,7 @@ #include <device/pci_def.h> #include <pc80/mc146818rtc.h> #include <pc80/isa-dma.h> +#include <arch/io.h> #include <arch/ioapic.h> #include <arch/acpi.h> #include <pc80/i8254.h> @@ -335,6 +336,16 @@ unsigned long acpi_fill_mcfg(unsigned long current) return current; } +static void lpc_final(struct device *dev) +{ + if (!acpi_is_wakeup_s3()) { + if (CONFIG(HAVE_SMI_HANDLER)) + outl(0x0, ACPI_PM1_CNT_BLK); /* clear SCI_EN */ + else + outl(0x1, ACPI_PM1_CNT_BLK); /* set SCI_EN */ + } +} + static struct pci_operations lops_pci = { .set_subsystem = pci_dev_set_subsystem, }; @@ -347,6 +358,7 @@ static struct device_operations lpc_ops = { .write_acpi_tables = acpi_write_hpet, #endif .init = lpc_init, + .final = lpc_final, .scan_bus = scan_static_bus, .ops_pci = &lops_pci, .acpi_name = lpc_acpi_name, |