soc/amd: Refactor some ACPI S3 calls
Do not pass ACPI S3 state as a parameter, by locally calling acpi_is_wakeup_s3() compiler has better chance for optimizing HAVE_ACPI_RESUME=n case. Test for acpi_s3_allowed() is already included in the implementation of acpi_is_wakeup_s3() and is removed as redunandant. For ramstage, acpi_is_wakeup_s3() evaluates to romstage_handoff_if_resume(). Change-Id: I6c1e00ec3d5be9a47b9d911c73965bc0c2b17624 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/49838 Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
committed by
Felix Held
parent
f9acd37d7f
commit
9e591c409a
@@ -16,7 +16,6 @@
|
||||
#include <device/device.h>
|
||||
#include <device/pci.h>
|
||||
#include <device/pci_ids.h>
|
||||
#include <romstage_handoff.h>
|
||||
#include <amdblocks/agesawrapper.h>
|
||||
#include <amdblocks/agesawrapper_call.h>
|
||||
#include <agesa_headers.h>
|
||||
@@ -408,7 +407,7 @@ void fam15_finalize(void *chip_info)
|
||||
void domain_enable_resources(struct device *dev)
|
||||
{
|
||||
/* Must be called after PCI enumeration and resource allocation */
|
||||
if (!romstage_handoff_is_resume())
|
||||
if (!acpi_is_wakeup_s3())
|
||||
do_agesawrapper(AMD_INIT_MID, "amdinitmid");
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user