From 8a303b7865203bd208c9424f0c641e1c94a8e6fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sat, 15 Jul 2017 19:37:21 +0300 Subject: AGESA: Add guard for acpi_get_sleep_type() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With EARLY_CBMEM_INIT, this is defined from ACPI layer instead for ENV_RAMSTAGE. Change-Id: Ia9c1be4d3acaa0fa8827350558e6578c39b71602 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/20595 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Aaron Durbin --- src/southbridge/amd/agesa/hudson/ramtop.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/southbridge/amd/agesa/hudson') diff --git a/src/southbridge/amd/agesa/hudson/ramtop.c b/src/southbridge/amd/agesa/hudson/ramtop.c index 22b291d1bb..34cf74ebd2 100644 --- a/src/southbridge/amd/agesa/hudson/ramtop.c +++ b/src/southbridge/amd/agesa/hudson/ramtop.c @@ -19,6 +19,8 @@ #include #include "hudson.h" +#if !ENV_RAMSTAGE || IS_ENABLED(CONFIG_LATE_CBMEM_INIT) + int acpi_get_sleep_type(void) { u16 tmp = inw(ACPI_PM1_CNT_BLK); @@ -26,6 +28,8 @@ int acpi_get_sleep_type(void) return (int)tmp; } +#endif + void backup_top_of_low_cacheable(uintptr_t ramtop) { u32 dword = ramtop; -- cgit v1.2.3