aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/amd/persimmon/get_bus_conf.c
diff options
context:
space:
mode:
authorzbao <fishbaozi@gmail.com>2012-04-13 13:42:46 +0800
committerMarc Jones <marcj303@gmail.com>2012-04-16 18:26:21 +0200
commitf543c7b6d3e485dd59555de04e2649b19953187c (patch)
treeed55fa8cedf609e7cd61a94b72c28f78b53a51f6 /src/mainboard/amd/persimmon/get_bus_conf.c
parentf72237346d9a0894b4675f0b6915da6fdcccd31e (diff)
S3 code in the mainboard.
Persimmon is the demo board. Tested by Linux and Windows 7. Change-Id: I5ded942b51e63ebeb08ace0b202b4ed239b0c14c Signed-off-by: Zheng Bao <zheng.bao@amd.com> Signed-off-by: zbao <fishbaozi@gmail.com> Reviewed-on: http://review.coreboot.org/624 Tested-by: build bot (Jenkins) Reviewed-by: Marc Jones <marcj303@gmail.com>
Diffstat (limited to 'src/mainboard/amd/persimmon/get_bus_conf.c')
-rw-r--r--src/mainboard/amd/persimmon/get_bus_conf.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/mainboard/amd/persimmon/get_bus_conf.c b/src/mainboard/amd/persimmon/get_bus_conf.c
index 0142762c0a..4c094aecae 100644
--- a/src/mainboard/amd/persimmon/get_bus_conf.c
+++ b/src/mainboard/amd/persimmon/get_bus_conf.c
@@ -51,6 +51,9 @@ u32 sbdn_sb800;
static u32 get_bus_conf_done = 0;
+#if CONFIG_HAVE_ACPI_RESUME == 1
+extern u8 acpi_slp_type;
+#endif
void get_bus_conf(void)
{
@@ -80,11 +83,20 @@ void get_bus_conf(void)
* of each of the write functions called prior to the ACPI write functions, so this
* becomes the best place for this call.
*/
+#if CONFIG_HAVE_ACPI_RESUME == 1
+ if (acpi_slp_type != 3) {
+ status = agesawrapper_amdinitlate();
+ if(status)
+ printk(BIOS_DEBUG, "agesawrapper_amdinitlate failed: %x \n", status);
+ status = agesawrapper_amdS3Save();
+ if(status)
+ printk(BIOS_DEBUG, "agesawrapper_amds3save failed: %x \n", status);
+ }
+#else
status = agesawrapper_amdinitlate();
- if(status) {
+ if(status)
printk(BIOS_DEBUG, "agesawrapper_amdinitlate failed: %x \n", status);
- }
-
+#endif
sbdn_sb800 = 0;
for (i = 0; i < 3; i++) {
@@ -124,7 +136,8 @@ void get_bus_conf(void)
for (j = bus_sb800[2]; j < bus_isa; j++)
bus_type[j] = 1;
- /* I/O APICs: APIC ID Version State Address */
+
+ /* I/O APICs: APIC ID Version State Address */
bus_isa = 10;
apicid_base = CONFIG_MAX_CPUS;
apicid_sb800 = apicid_base;