summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc Jones <marc.jones@se-eng.com>2012-11-05 17:25:52 -0700
committerRonald G. Minnich <rminnich@gmail.com>2013-02-27 03:03:05 +0100
commitda3087f67d516350249779745927861c4da2173d (patch)
tree45020c6ef8b79ae8320fd1ca1452a171861b5e26 /src
parentdb4f875a412e6c41f48a86a79b72465f6cd81635 (diff)
downloadcoreboot-da3087f67d516350249779745927861c4da2173d.tar.xz
Mainboard SMI S state handler was using the wrong defines
The PCH register bit definition for sleep type is a little confusing. For example, 7 is S5. To make this simpler for the mainbaord developer, the mainboard smi sleep hander is called as mainboard_sleep(slp_typ-2). A couple mainboard SMI handlers were using the PCH define for slp_ty, so S3 code would be run for S5 and S5 code would never be run. Change-Id: Iaecf96bfd48cf00153600cd119760364fbdfc29e Signed-off-by: Marc Jones <marc.jones@se-eng.com> Reviewed-on: http://review.coreboot.org/2514 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/intel/emeraldlake2/smihandler.c6
-rw-r--r--src/mainboard/samsung/stumpy/smihandler.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/mainboard/intel/emeraldlake2/smihandler.c b/src/mainboard/intel/emeraldlake2/smihandler.c
index 03c505b816..acc1fde93d 100644
--- a/src/mainboard/intel/emeraldlake2/smihandler.c
+++ b/src/mainboard/intel/emeraldlake2/smihandler.c
@@ -59,11 +59,11 @@ void mainboard_smi_sleep(u8 slp_typ)
u8 reg8;
switch (slp_typ) {
- case SLP_TYP_S3:
- case SLP_TYP_S4:
+ case 3:
+ case 4:
break;
- case SLP_TYP_S5:
+ case 5:
/* Turn off LED */
reg8 = inb(SIO_GPIO_BASE_SET4);
reg8 |= (1 << 5);
diff --git a/src/mainboard/samsung/stumpy/smihandler.c b/src/mainboard/samsung/stumpy/smihandler.c
index 660bb31cd4..5eda0a1072 100644
--- a/src/mainboard/samsung/stumpy/smihandler.c
+++ b/src/mainboard/samsung/stumpy/smihandler.c
@@ -62,8 +62,8 @@ void mainboard_smi_sleep(u8 slp_typ)
u8 reg8;
switch (slp_typ) {
- case SLP_TYP_S3:
- case SLP_TYP_S4:
+ case 3:
+ case 4:
/* Blink LED */
it8772f_enter_conf();
it8772f_sio_write(IT8772F_CONFIG_REG_LDN, IT8772F_GPIO);
@@ -79,7 +79,7 @@ void mainboard_smi_sleep(u8 slp_typ)
it8772f_exit_conf();
break;
- case SLP_TYP_S5:
+ case 5:
/* Turn off LED */
reg8 = inb(SIO_GPIO_BASE_SET4);
reg8 |= (1 << 5);