sandy/ivy boards: Use acpi_s3_resume_allowed()
Change-Id: I8e0d43293e095c1c76c3cfef1f426737624ea37f Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/6063 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Marc Jones <marc.jones@se-eng.com>
This commit is contained in:
parent
bb805e156a
commit
6722f8da40
|
@ -28,6 +28,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include "northbridge/intel/sandybridge/sandybridge.h"
|
||||
|
@ -207,16 +208,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
post_code(0x38);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include "northbridge/intel/sandybridge/sandybridge.h"
|
||||
|
@ -244,16 +245,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
/* This is the fastest way to let users know
|
||||
* the Intel CPU is now alive.
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include "northbridge/intel/sandybridge/sandybridge.h"
|
||||
|
@ -207,16 +208,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
post_code(0x38);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include "northbridge/intel/sandybridge/sandybridge.h"
|
||||
|
@ -254,16 +255,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
/* Do ec reset as early as possible, but skip it on S3 resume */
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include "superio/smsc/sio1007/chip.h"
|
||||
|
@ -255,16 +256,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
post_code(0x38);
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include "northbridge/intel/sandybridge/sandybridge.h"
|
||||
|
@ -258,16 +259,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
post_code(0x38);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include <northbridge/intel/sandybridge/sandybridge.h>
|
||||
|
@ -211,16 +212,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
post_code(0x38);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include "northbridge/intel/sandybridge/sandybridge.h"
|
||||
|
@ -211,16 +212,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
post_code(0x38);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include "northbridge/intel/sandybridge/sandybridge.h"
|
||||
|
@ -201,16 +202,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
post_code(0x38);
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <cbfs.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include <bootmode.h>
|
||||
|
@ -230,16 +231,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
post_code(0x38);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include <device/pnp_def.h>
|
||||
#include <cpu/x86/lapic.h>
|
||||
#include <pc80/mc146818rtc.h>
|
||||
#include <arch/acpi.h>
|
||||
#include <cbmem.h>
|
||||
#include <console/console.h>
|
||||
#include <bootmode.h>
|
||||
|
@ -271,16 +272,16 @@ void main(unsigned long bist)
|
|||
pm1_cnt = inl(DEFAULT_PMBASE + PM1_CNT);
|
||||
|
||||
if ((pm1_sts & WAK_STS) && ((pm1_cnt >> 10) & 7) == 5) {
|
||||
#if CONFIG_HAVE_ACPI_RESUME
|
||||
if (acpi_s3_resume_allowed()) {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected.\n");
|
||||
boot_mode = 2;
|
||||
/* Clear SLP_TYPE. This will break stage2 but
|
||||
* we care for that when we get there.
|
||||
*/
|
||||
outl(pm1_cnt & ~(7 << 10), DEFAULT_PMBASE + PM1_CNT);
|
||||
#else
|
||||
} else {
|
||||
printk(BIOS_DEBUG, "Resume from S3 detected, but disabled.\n");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
post_code(0x38);
|
||||
|
|
Loading…
Reference in New Issue