From bba0346ef5406b085d15226ec43db4bbeee0ef92 Mon Sep 17 00:00:00 2001 From: Sven Schnelle Date: Tue, 31 Jan 2012 17:41:12 +0100 Subject: X60/T60: Add option to enable/disable bluetooth Change-Id: I9761a8a9a7cc708fe95169cb8b79b413b97ee523 Signed-off-by: Sven Schnelle Reviewed-on: http://review.coreboot.org/598 Tested-by: build bot (Jenkins) --- src/ec/lenovo/h8/h8.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ec/lenovo/h8') diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index f20cd389dc..ecd34b2fe7 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -27,6 +27,14 @@ #include "chip.h" #include +static void h8_bluetooth_enable(int on) +{ + if (on) + ec_set_bit(0x3a, 4); + else + ec_clr_bit(0x3a, 4); +} + void h8_trackpoint_enable(int on) { ec_write(H8_TRACKPOINT_CTRL, @@ -143,6 +151,9 @@ static void h8_enable(device_t dev) ec_write(H8_VOLUME_CONTROL, val); + if (!get_option(&val, "bluetooth")) + h8_bluetooth_enable(val); + if (!get_option(&val, "first_battery")) { tmp = ec_read(H8_CONFIG3); tmp &= ~(1 << 4); -- cgit v1.2.3