X60/T60: Add option to enable/disable bluetooth
authorSven Schnelle <svens@stackframe.org>
Tue, 31 Jan 2012 16:41:12 +0000 (17:41 +0100)
committerSven Schnelle <svens@stackframe.org>
Tue, 31 Jan 2012 17:03:40 +0000 (18:03 +0100)
Change-Id: I9761a8a9a7cc708fe95169cb8b79b413b97ee523
Signed-off-by: Sven Schnelle <svens@stackframe.org>
Reviewed-on: http://review.coreboot.org/598
Tested-by: build bot (Jenkins)
src/ec/lenovo/h8/h8.c
src/mainboard/lenovo/t60/cmos.layout
src/mainboard/lenovo/x60/cmos.layout

index f20cd389dc8c8a145d3d281d4c7e56bbe1bfa112..ecd34b2fe7bfa6ca5b865c7836dcb86510c6e174 100644 (file)
 #include "chip.h"
 #include <pc80/mc146818rtc.h>
 
+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);
index 8d9dce49bb1a272dd827a4a0c6da2f91f596f522..7539b606d84d1c5ef6e66a7569080223adf6e924 100644 (file)
@@ -108,6 +108,7 @@ entries
 1052         4       r       0        C1DRT1
 
 1060         1       e       1        touchpad
+1061        1       e       1        bluetooth
 1064         8       h       0        volume
 1072         1       e       9        first_battery
 # -----------------------------------------------------------------
index cae70cb91e1d7ee3d2d4e7ad581bea09583bd015..ab51a84aa454ba46df780e0cd00161e35768895b 100644 (file)
@@ -110,6 +110,7 @@ entries
 1064         8       h       0        volume
 1072         8       h       0        tft_brightness
 1080         1       e       9        first_battery
+1081        1       e       1        bluetooth
 # -----------------------------------------------------------------
 
 enumerations