[coreboot-gerrit] Patch set updated for coreboot: e88fc1f northbridge/amd/agesa: Use acpi_is_wakeup_s3()

Kyösti Mälkki (kyosti.malkki@gmail.com) gerrit at coreboot.org
Fri Jun 20 10:03:08 CEST 2014


Kyösti Mälkki (kyosti.malkki at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6076

-gerrit

commit e88fc1feec5e2e69efa7ed4236e271b3c0f9d2f2
Author: Kyösti Mälkki <kyosti.malkki at gmail.com>
Date:   Thu Jun 19 20:44:34 2014 +0300

    northbridge/amd/agesa: Use acpi_is_wakeup_s3()
    
    Change-Id: Ia6f5b0454e7fbbf36baa2372dfeec51b5f5e8f67
    Signed-off-by: Kyösti Mälkki <kyosti.malkki at gmail.com>
---
 src/northbridge/amd/agesa/family14/northbridge.c   | 14 ++------------
 src/northbridge/amd/agesa/family15tn/northbridge.c | 18 +++---------------
 src/northbridge/amd/agesa/family16kb/northbridge.c | 18 +++---------------
 3 files changed, 8 insertions(+), 42 deletions(-)

diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c
index 847e6dd..ec07c18 100644
--- a/src/northbridge/amd/agesa/family14/northbridge.c
+++ b/src/northbridge/amd/agesa/family14/northbridge.c
@@ -19,6 +19,7 @@
 
 #include <console/console.h>
 #include <arch/io.h>
+#include <arch/acpi.h>
 #include <stdint.h>
 #include <device/device.h>
 #include <device/pci.h>
@@ -755,8 +756,6 @@ static void domain_set_resources(device_t dev)
 	printk(BIOS_DEBUG, "  adsr - leaving this lovely routine.\n");
 }
 
-extern u8 acpi_slp_type;
-
 static void domain_enable_resources(device_t dev)
 {
 	u32 val;
@@ -778,8 +777,7 @@ static void domain_enable_resources(device_t dev)
 	/* Must be called after PCI enumeration and resource allocation */
 	printk(BIOS_DEBUG, "\nFam14h - %s\n", __func__);
 
-#if CONFIG_HAVE_ACPI_RESUME
-	if (acpi_slp_type != 3) {
+	if (!acpi_is_wakeup_s3()) {
 		printk(BIOS_DEBUG, "agesawrapper_amdinitmid ");
 		val = agesawrapper_amdinitmid ();
 		if (val)
@@ -787,14 +785,6 @@ static void domain_enable_resources(device_t dev)
 		else
 			printk(BIOS_DEBUG, "passed.\n");
 	}
-#else
-	printk(BIOS_DEBUG, "agesawrapper_amdinitmid ");
-	val = agesawrapper_amdinitmid ();
-	if (val)
-		printk(BIOS_DEBUG, "error level: %x \n", val);
-	else
-		printk(BIOS_DEBUG, "passed.\n");
-#endif
 
 	printk(BIOS_DEBUG, "  ader - leaving domain_enable_resources.\n");
 }
diff --git a/src/northbridge/amd/agesa/family15tn/northbridge.c b/src/northbridge/amd/agesa/family15tn/northbridge.c
index 2b5549d..8c931ad 100644
--- a/src/northbridge/amd/agesa/family15tn/northbridge.c
+++ b/src/northbridge/amd/agesa/family15tn/northbridge.c
@@ -19,6 +19,7 @@
 
 #include <console/console.h>
 #include <arch/io.h>
+#include <arch/acpi.h>
 #include <stdint.h>
 #include <device/device.h>
 #include <device/pci.h>
@@ -552,20 +553,15 @@ static void domain_read_resources(device_t dev)
 #endif
 }
 
-extern u8 acpi_slp_type;
-
 static void domain_enable_resources(device_t dev)
 {
 	u32 val;
-#if CONFIG_HAVE_ACPI_RESUME
-	if (acpi_slp_type == 3)
+	if (acpi_is_wakeup_s3())
 		agesawrapper_fchs3laterestore();
-#endif
 
 	/* Must be called after PCI enumeration and resource allocation */
 	printk(BIOS_DEBUG, "\nFam15 - %s: AmdInitMid.\n", __func__);
-#if CONFIG_HAVE_ACPI_RESUME
-	if (acpi_slp_type != 3) {
+	if (!acpi_is_wakeup_s3()) {
 		printk(BIOS_DEBUG, "agesawrapper_amdinitmid ");
 		val = agesawrapper_amdinitmid ();
 		if (val)
@@ -573,14 +569,6 @@ static void domain_enable_resources(device_t dev)
 		else
 			printk(BIOS_DEBUG, "passed.\n");
 	}
-#else
-	printk(BIOS_DEBUG, "agesawrapper_amdinitmid ");
-	val = agesawrapper_amdinitmid ();
-	if (val)
-		printk(BIOS_DEBUG, "error level: %x \n", val);
-	else
-		printk(BIOS_DEBUG, "passed.\n");
-#endif
 
 	printk(BIOS_DEBUG, "  ader - leaving %s.\n", __func__);
 }
diff --git a/src/northbridge/amd/agesa/family16kb/northbridge.c b/src/northbridge/amd/agesa/family16kb/northbridge.c
index 6feabf4..f557468 100644
--- a/src/northbridge/amd/agesa/family16kb/northbridge.c
+++ b/src/northbridge/amd/agesa/family16kb/northbridge.c
@@ -19,6 +19,7 @@
 
 #include <console/console.h>
 #include <arch/io.h>
+#include <arch/acpi.h>
 #include <stdint.h>
 #include <device/device.h>
 #include <device/pci.h>
@@ -556,20 +557,15 @@ static void domain_read_resources(device_t dev)
 #endif
 }
 
-extern u8 acpi_slp_type;
-
 static void domain_enable_resources(device_t dev)
 {
 	u32 val;
-#if CONFIG_HAVE_ACPI_RESUME
-	if (acpi_slp_type == 3)
+	if (acpi_is_wakeup_s3())
 		agesawrapper_fchs3laterestore();
-#endif
 
 	/* Must be called after PCI enumeration and resource allocation */
 	printk(BIOS_DEBUG, "\nFam16 - domain_enable_resources: AmdInitMid.\n");
-#if CONFIG_HAVE_ACPI_RESUME
-	if (acpi_slp_type != 3) {
+	if (!acpi_is_wakeup_s3()) {
 		printk(BIOS_DEBUG, "agesawrapper_amdinitmid ");
 		val = agesawrapper_amdinitmid ();
 		if (val)
@@ -577,14 +573,6 @@ static void domain_enable_resources(device_t dev)
 		else
 			printk(BIOS_DEBUG, "passed.\n");
 	}
-#else
-	printk(BIOS_DEBUG, "agesawrapper_amdinitmid ");
-	val = agesawrapper_amdinitmid ();
-	if (val)
-		printk(BIOS_DEBUG, "error level: %x \n", val);
-	else
-		printk(BIOS_DEBUG, "passed.\n");
-#endif
 
 	printk(BIOS_DEBUG, "  ader - leaving domain_enable_resources.\n");
 }



More information about the coreboot-gerrit mailing list