[coreboot-gerrit] New patch to review for coreboot: 65e5184 ec/lenovo/h8: Allow user to disable powermanagement beeps.

Vladimir Serbinenko (phcoder@gmail.com) gerrit at coreboot.org
Sat Jan 11 13:34:08 CET 2014


Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/4662

-gerrit

commit 65e518463ddf22f34d275e97dfe3cff3039efa82
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date:   Sat Jan 11 10:59:11 2014 +0100

    ec/lenovo/h8: Allow user to disable powermanagement beeps.
    
    They're pretty annoying.
    
    Change-Id: I44d26dc168927a9cedfd6ecc4c9a51a3a7b362c7
    Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
 src/ec/lenovo/h8/h8.c                  | 12 ++++++++++--
 src/mainboard/lenovo/t60/cmos.layout   |  1 +
 src/mainboard/lenovo/x201/cmos.default |  1 +
 src/mainboard/lenovo/x201/cmos.layout  |  3 ++-
 src/mainboard/lenovo/x60/cmos.default  |  1 +
 src/mainboard/lenovo/x60/cmos.layout   |  1 +
 6 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 0e65a0e..d6a07e7 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -168,8 +168,16 @@ static void h8_enable(device_t dev)
 	ec_write(H8_CONFIG2, conf->config2);
 	ec_write(H8_CONFIG3, conf->config3);
 
-	ec_write(H8_SOUND_ENABLE0, conf->beepmask0);
-	ec_write(H8_SOUND_ENABLE1, conf->beepmask1);
+	if (get_option(&val, "power_management_beeps") != CB_SUCCESS)
+		val = 1;
+
+	if (val) {
+		ec_write(H8_SOUND_ENABLE0, conf->beepmask0);
+		ec_write(H8_SOUND_ENABLE1, conf->beepmask1);
+	} else  {
+		ec_write(H8_SOUND_ENABLE0, 0x00);
+		ec_write(H8_SOUND_ENABLE1, 0x00);
+	}
 	ec_write(H8_SOUND_REPEAT, 0x00);
 
 	ec_write(0x10, conf->event0_enable);
diff --git a/src/mainboard/lenovo/t60/cmos.layout b/src/mainboard/lenovo/t60/cmos.layout
index 72172ea..94358a2 100644
--- a/src/mainboard/lenovo/t60/cmos.layout
+++ b/src/mainboard/lenovo/t60/cmos.layout
@@ -114,6 +114,7 @@ entries
 1072         1       e       9        first_battery
 1074         1       e       1        fn_ctrl_swap
 1075         1       e       1        locking_fn
+1076         1       e       1        power_management_beeps
 # -----------------------------------------------------------------
 
 enumerations
diff --git a/src/mainboard/lenovo/x201/cmos.default b/src/mainboard/lenovo/x201/cmos.default
index 43b44d8..d133d98 100644
--- a/src/mainboard/lenovo/x201/cmos.default
+++ b/src/mainboard/lenovo/x201/cmos.default
@@ -11,3 +11,4 @@ wwan=Enable
 touchpad=Enable
 fn_ctrl_swap=Disable
 locking_fn=Disable
+power_management_beeps=Enable
diff --git a/src/mainboard/lenovo/x201/cmos.layout b/src/mainboard/lenovo/x201/cmos.layout
index 035c1b7..5252fa2 100644
--- a/src/mainboard/lenovo/x201/cmos.layout
+++ b/src/mainboard/lenovo/x201/cmos.layout
@@ -92,7 +92,8 @@ entries
 414         1       e       1        touchpad
 417         1       e       1        fn_ctrl_swap
 418         1       e       1        locking_fn
-#419        565     r       0        unused
+419         1       e       1        power_management_beeps
+#420        564     r       0        unused
 
 # coreboot config options: check sums
 984         16       h       0        check_sum
diff --git a/src/mainboard/lenovo/x60/cmos.default b/src/mainboard/lenovo/x60/cmos.default
index 3e0e094..2992c53 100644
--- a/src/mainboard/lenovo/x60/cmos.default
+++ b/src/mainboard/lenovo/x60/cmos.default
@@ -14,3 +14,4 @@ first_battery=Primary
 bluetooth=Enable
 fn_ctrl_swap=Disable
 locking_fn=Disable
+power_management_beeps=Enable
diff --git a/src/mainboard/lenovo/x60/cmos.layout b/src/mainboard/lenovo/x60/cmos.layout
index 8475fef..b5d0993 100644
--- a/src/mainboard/lenovo/x60/cmos.layout
+++ b/src/mainboard/lenovo/x60/cmos.layout
@@ -114,6 +114,7 @@ entries
 1082         1       e       1        wwan
 1085         1       e       1        fn_ctrl_swap
 1086         1       e       1        locking_fn
+1087         1       e       1        power_management_beeps
 # -----------------------------------------------------------------
 
 enumerations



More information about the coreboot-gerrit mailing list