diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-06-05 11:33:41 +0200 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2011-06-07 22:01:29 +0200 |
commit | f4dc1a73e440766bbc12b738462ae9467f6030fe (patch) | |
tree | 467073c23cc2f42ebf56c9101f11c12d2a224a12 /src/southbridge/intel/i82801gx/lpc.c | |
parent | bb60528e73ed611553befba2ea1bdf8c690a26e5 (diff) |
SMM: add defines for APM_CNT register
in the current code, the defines for the APM_CNT (0xb2) register
are duplicated in almost every place where it is used. define those
values in cpu/x86/smm.h, and only include this file.
And while at it, fixup whitespace.
Change-Id: Iae712aff53322acd51e89986c2abf4c794e25484
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/4
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/southbridge/intel/i82801gx/lpc.c')
-rw-r--r-- | src/southbridge/intel/i82801gx/lpc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/southbridge/intel/i82801gx/lpc.c b/src/southbridge/intel/i82801gx/lpc.c index 7feb76a5fb..394f161f95 100644 --- a/src/southbridge/intel/i82801gx/lpc.c +++ b/src/southbridge/intel/i82801gx/lpc.c @@ -29,6 +29,7 @@ #include <arch/ioapic.h> #include <cpu/cpu.h> #include "i82801gx.h" +#include <cpu/x86/smm.h> #define NMI_OFF 0 @@ -341,13 +342,13 @@ static void i82801gx_lock_smm(struct device *dev) #endif #if ENABLE_ACPI_MODE_IN_COREBOOT - printk(BIOS_DEBUG, "Enabling ACPI via APMC:\n"); - outb(0xe1, 0xb2); // Enable ACPI mode - printk(BIOS_DEBUG, "done.\n"); + printk(BIOS_DEBUG, "Enabling ACPI via APMC:\n"); + outb(APM_CNT_ACPI_ENABLE, APM_CNT); // Enable ACPI mode + printk(BIOS_DEBUG, "done.\n"); #else - printk(BIOS_DEBUG, "Disabling ACPI via APMC:\n"); - outb(0x1e, 0xb2); // Disable ACPI mode - printk(BIOS_DEBUG, "done.\n"); + printk(BIOS_DEBUG, "Disabling ACPI via APMC:\n"); + outb(APM_CNT_ACPI_DISABLE, APM_CNT); // Disable ACPI mode + printk(BIOS_DEBUG, "done.\n"); #endif /* Don't allow evil boot loaders, kernels, or * userspace applications to deceive us: |