[coreboot-gerrit] New patch to review for coreboot: 7cef3e7 Revert "Radio and dock support in EC on X60 and X201"

Peter Stuge (peter@stuge.se) gerrit at coreboot.org
Sat Jul 6 20:20:45 CEST 2013


Peter Stuge (peter at stuge.se) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3616

-gerrit

commit 7cef3e75c800f17063ad3f6cd9383e154a97b2b1
Author: Peter Stuge <peter at stuge.se>
Date:   Sat Jul 6 20:20:45 2013 +0200

    Revert "Radio and dock support in EC on X60 and X201"
    
    This reverts commit 7d1ebbff5ad224591a2d1972737611f96a13145c
    
    Change-Id: I4a9d0cd31a3df3d1e092193953f334697ca65167
    Signed-off-by: Peter Stuge <peter at stuge.se>
---
 src/ec/lenovo/h8/h8.c | 45 ++++++++++-----------------------------------
 1 file changed, 10 insertions(+), 35 deletions(-)

diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 350cc77..9ffdfc1 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -27,10 +27,6 @@
 #include "chip.h"
 #include <pc80/mc146818rtc.h>
 
-#if defined (CONFIG_BOARD_LENOVO_X201) && CONFIG_BOARD_LENOVO_X201
-#include "mainboard/lenovo/x201/dock.h"
-#endif
-
 static void h8_bluetooth_enable(int on)
 {
 	if (on)
@@ -41,7 +37,8 @@ static void h8_bluetooth_enable(int on)
 
 void h8_trackpoint_enable(int on)
 {
-	ec_write(H8_TRACKPOINT_CTRL, on ? H8_TRACKPOINT_ON : H8_TRACKPOINT_OFF);
+	ec_write(H8_TRACKPOINT_CTRL,
+		 on ? H8_TRACKPOINT_ON : H8_TRACKPOINT_OFF);
 
 }
 
@@ -53,14 +50,6 @@ void h8_wlan_enable(int on)
 		ec_clr_bit(0x3a, 5);
 }
 
-static void h8_3g_enable(int on)
-{
-	if (on)
-		ec_set_bit(0x3a, 6);
-	else
-		ec_clr_bit(0x3a, 6);
-}
-
 static void h8_log_ec_version(void)
 {
 	unsigned char ecfw[9], c;
@@ -161,31 +150,17 @@ static void h8_enable(device_t dev)
 	if (!get_option(&val, "volume"))
 		ec_write(H8_VOLUME_CONTROL, val);
 
-	if (get_option(&val, "bluetooth"))
-		val = 1;
-	h8_bluetooth_enable(val);
-
-	if (get_option(&val, "umts"))
-		val = 1;
-
-	h8_3g_enable(val);
 
-	if (get_option(&val, "first_battery"))
-		val = 1;
+	if (!get_option(&val, "bluetooth"))
+		h8_bluetooth_enable(val);
 
-	tmp = ec_read(H8_CONFIG3);
-	tmp &= ~(1 << 4);
-	tmp |= (val & 1) << 4;
-	ec_write(H8_CONFIG3, tmp);
+	if (!get_option(&val, "first_battery")) {
+		tmp = ec_read(H8_CONFIG3);
+		tmp &= ~(1 << 4);
+		tmp |= (val & 1)<< 4;
+		ec_write(H8_CONFIG3, tmp);
+	}
 	h8_set_audio_mute(0);
-
-#if defined (CONFIG_BOARD_LENOVO_X201) && CONFIG_BOARD_LENOVO_X201
-	if (dock_present()) {
-		printk(BIOS_DEBUG, "dock is connected\n");
-		dock_connect();
-	} else
-		printk(BIOS_DEBUG, "dock is not connected\n");
-#endif
 }
 
 struct chip_operations ec_lenovo_h8_ops = {



More information about the coreboot-gerrit mailing list