amd/stoneyridge: Add S3 support to POST

Add/update the romstage and ramstage paths to check for S3 resume
and call the appropriate AGESA functions.

TEST=Suspend/Resume Kahlee with full S3 patch stack
BUG=b:69614064

Change-Id: Ie6ae66f88b888fff3a800b4ed55dd1f6fed712b2
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22731
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Marshall Dawson
2017-11-01 11:44:48 -06:00
committed by Martin Roth
parent bb6c3f59d1
commit 8f2a7e073b
4 changed files with 58 additions and 38 deletions

View File

@@ -28,6 +28,7 @@
#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>
@@ -425,14 +426,9 @@ void domain_read_resources(device_t dev)
void domain_enable_resources(device_t dev)
{
if (acpi_is_wakeup_s3())
do_agesawrapper(agesawrapper_fchs3laterestore,
"fchs3laterestore");
/* Must be called after PCI enumeration and resource allocation */
else
if (!romstage_handoff_is_resume())
do_agesawrapper(agesawrapper_amdinitmid, "amdinitmid");
printk(BIOS_DEBUG, " ader - leaving domain_enable_resources.\n");
}
void domain_set_resources(device_t dev)