[coreboot-gerrit] Patch set updated for coreboot: f61b596 Enable UMTS on Lenovo X60 and X201. Enable radios if no options are available. Enable dock on Lenovo X201.
Vladimir Serbinenko (phcoder@gmail.com)
gerrit at coreboot.org
Wed Jun 5 23:00:03 CEST 2013
Vladimir Serbinenko (phcoder at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/3377
-gerrit
commit f61b596d42e910c88ec5668e330c1deaf588ce76
Author: Vladimir Serbinenko <phcoder at gmail.com>
Date: Wed Jun 5 22:43:44 2013 +0200
Enable UMTS on Lenovo X60 and X201.
Enable radios if no options are available.
Enable dock on Lenovo X201.
Change-Id: I6e8d3bbd6a6b1a8e59473dd5cc8125a1583d75df
Signed-off-by: Vladimir Serbinenko <phcoder at gmail.com>
---
src/ec/lenovo/h8/h8.c | 44 ++++++++++++++++++++++++++++++++++++--------
1 file changed, 36 insertions(+), 8 deletions(-)
diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c
index 9ffdfc1..2b2ba35 100644
--- a/src/ec/lenovo/h8/h8.c
+++ b/src/ec/lenovo/h8/h8.c
@@ -27,6 +27,10 @@
#include "chip.h"
#include <pc80/mc146818rtc.h>
+#ifdef CONFIG_BOARD_LENOVO_X201
+#include "mainboard/lenovo/x201/dock.h"
+#endif
+
static void h8_bluetooth_enable(int on)
{
if (on)
@@ -50,6 +54,14 @@ 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;
@@ -150,17 +162,33 @@ 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, "bluetooth"))
- h8_bluetooth_enable(val);
+ if (get_option(&val, "umts"))
+ val = 1;
- if (!get_option(&val, "first_battery")) {
- tmp = ec_read(H8_CONFIG3);
- tmp &= ~(1 << 4);
- tmp |= (val & 1)<< 4;
- ec_write(H8_CONFIG3, tmp);
- }
+ h8_3g_enable(val);
+
+ if (get_option(&val, "first_battery"))
+ val = 1;
+
+ tmp = ec_read(H8_CONFIG3);
+ tmp &= ~(1 << 4);
+ tmp |= (val & 1)<< 4;
+ ec_write(H8_CONFIG3, tmp);
h8_set_audio_mute(0);
+
+#ifdef 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