diff options
author | Sven Schnelle <svens@stackframe.org> | 2011-06-16 16:43:04 +0200 |
---|---|---|
committer | Sven Schnelle <svens@stackframe.org> | 2011-06-16 17:00:12 +0200 |
commit | 86e1aea3e6ff0610ab832d923b530b3c5a768c71 (patch) | |
tree | 39da3aeb0f09ea6539886def8e22a2fe08635ee1 /src/ec/lenovo/h8/h8.c | |
parent | bfe8e5186ea9916634d31182ec0437f6175e7724 (diff) | |
download | coreboot-86e1aea3e6ff0610ab832d923b530b3c5a768c71.tar.xz |
Lenovo H8 EC: add usb_power_enable()
Can be used to disable/enable Power output on USB ports.
Change-Id: I5eb52b33c9e3359b0e5874bda2c0c8d75c196bc2
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/37
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/ec/lenovo/h8/h8.c')
-rw-r--r-- | src/ec/lenovo/h8/h8.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index ef308b1bac..2c25d29141 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -88,6 +88,14 @@ void h8_disable_event(int event) } +void h8_usb_power_enable(int onoff) +{ + if (onoff) + ec_set_bit(0x3b, 4); + else + ec_clr_bit(0x3b, 4); +} + int h8_ultrabay_device_present(void) { return ec_read(H8_STATUS1) & 0x5 ? 0 : 1; @@ -129,6 +137,7 @@ static void h8_enable(device_t dev) ec_write(H8_FAN_CONTROL, H8_FAN_CONTROL_AUTO); h8_wlan_enable(conf->wlan_enable); h8_trackpoint_enable(conf->trackpoint_enable); + h8_usb_power_enable(1); if (!get_option(&val, "volume")) ec_write(H8_VOLUME_CONTROL, val); |