From e1b468e1a7cbea55108fb106105612e1f50c9487 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Wed, 18 Jun 2014 09:10:53 +0300 Subject: AGESA boards: Use acpi_s3_resume_allowed() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This adds use of BROKEN_CAR_MIGRATE to include CBMEM symbols for the build of romstage also for boards without HAVE_ACPI_RESUME. These symbols got exposed as the use of preprocessor directives was reduced. We expect the linker to do a fair job and optimize away function bodies that are on unreachable execution paths. Change-Id: Ibf5181d3eecb87ce647abe0be01072594b05aa5f Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/6067 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan --- src/mainboard/asrock/imb-a180/agesawrapper.c | 2 -- src/mainboard/asrock/imb-a180/romstage.c | 7 ++----- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src/mainboard/asrock/imb-a180') diff --git a/src/mainboard/asrock/imb-a180/agesawrapper.c b/src/mainboard/asrock/imb-a180/agesawrapper.c index 4e9e77ba8d..083de3d716 100644 --- a/src/mainboard/asrock/imb-a180/agesawrapper.c +++ b/src/mainboard/asrock/imb-a180/agesawrapper.c @@ -454,7 +454,6 @@ agesawrapper_amdlaterunaptask ( return (UINT32)Status; } -#if CONFIG_HAVE_ACPI_RESUME UINT32 agesawrapper_amdinitresume(VOID) { @@ -656,7 +655,6 @@ UINT32 agesawrapper_amdS3Save(VOID) } #endif /* #ifndef __PRE_RAM__ */ -#endif /* CONFIG_HAVE_ACPI_RESUME */ UINT32 agesawrapper_amdreadeventlog ( diff --git a/src/mainboard/asrock/imb-a180/romstage.c b/src/mainboard/asrock/imb-a180/romstage.c index 8ed5e05626..a818e0302c 100644 --- a/src/mainboard/asrock/imb-a180/romstage.c +++ b/src/mainboard/asrock/imb-a180/romstage.c @@ -116,9 +116,8 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) } printk(BIOS_DEBUG, "Got past agesawrapper_amdinitearly\n"); -#if CONFIG_HAVE_ACPI_RESUME - if (!acpi_is_wakeup_early()) { /* Check for S3 resume */ -#endif + int s3resume = acpi_is_wakeup_early() && acpi_s3_resume_allowed(); + if (!s3resume) { post_code(0x40); val = agesawrapper_amdinitpost (); if(val) { @@ -134,7 +133,6 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) printk(BIOS_DEBUG, "Got past agesawrapper_amdinitenv\n"); /* TODO: Disable cache is not ok. */ disable_cache_as_ram(); -#if CONFIG_HAVE_ACPI_RESUME } else { /* S3 detect */ printk(BIOS_INFO, "S3 detected\n"); @@ -156,7 +154,6 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx) post_code(0x61); prepare_for_resume(); } -#endif outb(0xEA, 0xCD6); outb(0x1, 0xcd7); -- cgit v1.2.3