summaryrefslogtreecommitdiff
path: root/src/ec/lenovo/h8
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2013-11-13 18:31:24 +0100
committerVladimir Serbinenko <phcoder@gmail.com>2013-12-15 17:49:23 +0100
commit2c8766891444eb49db2ec54146c7e83c0c1f8304 (patch)
tree7d478594230ace3c241ea4f19bc9641f0a01d5cf /src/ec/lenovo/h8
parentcc2f3452e4bd191aef8436863628685f30c925ea (diff)
ec/lenovo/h8: Fix peripheral init without CMOS config
Currently H8 skips important init if unable to access CMOS config. Change default to enable all features to have a sane system without using CMOS config. Change-Id: I4448ccd21beae8ad23eb22391770c6fe3b83e3b4 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/4515 Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/ec/lenovo/h8')
-rw-r--r--src/ec/lenovo/h8/h8.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index d0a9ea956b..ac77001229 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -171,16 +171,17 @@ static void h8_enable(device_t dev)
if (get_option(&val, "volume") == CB_SUCCESS)
ec_write(H8_VOLUME_CONTROL, val);
+ if (get_option(&val, "bluetooth") != CB_SUCCESS)
+ val = 1;
+ h8_bluetooth_enable(val);
- if (get_option(&val, "bluetooth") == CB_SUCCESS)
- h8_bluetooth_enable(val);
+ if (get_option(&val, "first_battery") != CB_SUCCESS)
+ val = 1;
- if (get_option(&val, "first_battery") == CB_SUCCESS) {
- tmp = ec_read(H8_CONFIG3);
- tmp &= ~(1 << 4);
- tmp |= (val & 1)<< 4;
- ec_write(H8_CONFIG3, tmp);
- }
+ tmp = ec_read(H8_CONFIG3);
+ tmp &= ~(1 << 4);
+ tmp |= (val & 1) << 4;
+ ec_write(H8_CONFIG3, tmp);
h8_set_audio_mute(0);
#if !IS_ENABLED(CONFIG_H8_DOCK_EARLY_INIT)