diff options
author | Vladimir Serbinenko <phcoder@gmail.com> | 2014-01-11 20:58:20 +0100 |
---|---|---|
committer | Vladimir Serbinenko <phcoder@gmail.com> | 2014-01-12 18:03:46 +0100 |
commit | add3f7fda27eb93636b473471d17f985f14cbb8d (patch) | |
tree | da568f1aa0f15b839b9356652554b92ec9c4b7a4 /src | |
parent | 9a3b9c42d3063b03bf0028a3cbca0f2465f8f609 (diff) | |
download | coreboot-add3f7fda27eb93636b473471d17f985f14cbb8d.tar.xz |
ec/lenovo/h8: Allow control of low-battery beep.
Change-Id: I2f422e83f2afcf0cc3f3ecbace01a8f4f39e87d4
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-on: http://review.coreboot.org/4663
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/lenovo/h8/h8.c | 10 | ||||
-rw-r--r-- | src/mainboard/lenovo/t60/cmos.layout | 1 | ||||
-rw-r--r-- | src/mainboard/lenovo/x201/cmos.default | 1 | ||||
-rw-r--r-- | src/mainboard/lenovo/x201/cmos.layout | 1 | ||||
-rw-r--r-- | src/mainboard/lenovo/x60/cmos.default | 1 | ||||
-rw-r--r-- | src/mainboard/lenovo/x60/cmos.layout | 1 |
6 files changed, 15 insertions, 0 deletions
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index 9c85da79db..0c80d49d82 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -178,6 +178,16 @@ static void h8_enable(device_t dev) beepmask0 = 0x00; beepmask1 = 0x00; } + + if (conf->has_power_management_beeps) { + if (get_option(&val, "low_battery_beep") != CB_SUCCESS) + val = 1; + if (val) + beepmask0 |= 2; + else + beepmask0 &= ~2; + } + ec_write(H8_SOUND_ENABLE0, beepmask0); ec_write(H8_SOUND_ENABLE1, beepmask1); diff --git a/src/mainboard/lenovo/t60/cmos.layout b/src/mainboard/lenovo/t60/cmos.layout index fc8b39514c..8f0e2be13c 100644 --- a/src/mainboard/lenovo/t60/cmos.layout +++ b/src/mainboard/lenovo/t60/cmos.layout @@ -115,6 +115,7 @@ entries 1074 1 e 1 fn_ctrl_swap 1075 1 e 1 sticky_fn 1076 1 e 1 power_management_beeps +1077 1 e 1 low_battery_beep # ----------------------------------------------------------------- enumerations diff --git a/src/mainboard/lenovo/x201/cmos.default b/src/mainboard/lenovo/x201/cmos.default index be59c220f9..c14e1446ef 100644 --- a/src/mainboard/lenovo/x201/cmos.default +++ b/src/mainboard/lenovo/x201/cmos.default @@ -12,4 +12,5 @@ touchpad=Enable fn_ctrl_swap=Disable sticky_fn=Disable power_management_beeps=Enable +low_battery_beep=Enable sata_mode=AHCI diff --git a/src/mainboard/lenovo/x201/cmos.layout b/src/mainboard/lenovo/x201/cmos.layout index e434112c5a..bf78aafbd2 100644 --- a/src/mainboard/lenovo/x201/cmos.layout +++ b/src/mainboard/lenovo/x201/cmos.layout @@ -93,6 +93,7 @@ entries 417 1 e 1 fn_ctrl_swap 418 1 e 1 sticky_fn 419 1 e 1 power_management_beeps +420 1 e 1 low_battery_beep 421 1 e 9 sata_mode #422 562 r 0 unused diff --git a/src/mainboard/lenovo/x60/cmos.default b/src/mainboard/lenovo/x60/cmos.default index 883bfd44f8..663fe5c3b8 100644 --- a/src/mainboard/lenovo/x60/cmos.default +++ b/src/mainboard/lenovo/x60/cmos.default @@ -15,3 +15,4 @@ bluetooth=Enable fn_ctrl_swap=Disable sticky_fn=Disable power_management_beeps=Enable +low_battery_beep=Enable diff --git a/src/mainboard/lenovo/x60/cmos.layout b/src/mainboard/lenovo/x60/cmos.layout index a2b45bd4c3..4898180c39 100644 --- a/src/mainboard/lenovo/x60/cmos.layout +++ b/src/mainboard/lenovo/x60/cmos.layout @@ -115,6 +115,7 @@ entries 1085 1 e 1 fn_ctrl_swap 1086 1 e 1 sticky_fn 1087 1 e 1 power_management_beeps +1088 1 e 1 low_battery_beep # ----------------------------------------------------------------- enumerations |