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)
This commit is contained in:
Vladimir Serbinenko 2013-11-13 18:31:24 +01:00
parent cc2f3452e4
commit 2c87668914
2 changed files with 12 additions and 10 deletions

View File

@ -171,16 +171,17 @@ static void h8_enable(device_t dev)
if (get_option(&val, "volume") == CB_SUCCESS) if (get_option(&val, "volume") == CB_SUCCESS)
ec_write(H8_VOLUME_CONTROL, val); 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) if (get_option(&val, "first_battery") != CB_SUCCESS)
h8_bluetooth_enable(val); val = 1;
if (get_option(&val, "first_battery") == CB_SUCCESS) { tmp = ec_read(H8_CONFIG3);
tmp = ec_read(H8_CONFIG3); tmp &= ~(1 << 4);
tmp &= ~(1 << 4); tmp |= (val & 1) << 4;
tmp |= (val & 1)<< 4; ec_write(H8_CONFIG3, tmp);
ec_write(H8_CONFIG3, tmp);
}
h8_set_audio_mute(0); h8_set_audio_mute(0);
#if !IS_ENABLED(CONFIG_H8_DOCK_EARLY_INIT) #if !IS_ENABLED(CONFIG_H8_DOCK_EARLY_INIT)

View File

@ -113,8 +113,9 @@ static void enable_dev(device_t dev)
pmh7_backlight_enable(conf->backlight_enable); pmh7_backlight_enable(conf->backlight_enable);
pmh7_dock_event_enable(conf->dock_event_enable); pmh7_dock_event_enable(conf->dock_event_enable);
if (get_option(&val, "touchpad") == CB_SUCCESS) if (get_option(&val, "touchpad") != CB_SUCCESS)
pmh7_touchpad_enable(val); val = 1;
pmh7_touchpad_enable(val);
} }
struct chip_operations ec_lenovo_pmh7_ops = { struct chip_operations ec_lenovo_pmh7_ops = {