From f422a443d7c540a4cec17f6314553d8eb23f4478 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Wed, 13 Nov 2013 21:53:23 +0100 Subject: ec/lenovo/h8: Enable 3G modem Just like bluetooth and wlan it need to be enabled in EC. Set the appropriate bit in EC if CMOS config says so. Change-Id: Ia48ca3201f013d3b4c4153f32ff536e06b6a2f6d Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/4516 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks Reviewed-by: Alexandru Gagniuc --- src/ec/lenovo/h8/h8.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/ec/lenovo') diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index ac77001229..4f9d2281ab 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -44,6 +44,7 @@ void h8_trackpoint_enable(int on) } +/* Controls radio-off pin in WLAN MiniPCIe slot. */ void h8_wlan_enable(int on) { if (on) @@ -52,6 +53,15 @@ void h8_wlan_enable(int on) ec_clr_bit(0x3a, 5); } +/* Controls radio-off pin in WWAN MiniPCIe slot. */ +static void h8_wwan_enable(int on) +{ + if (on) + ec_set_bit(0x3a, 6); + else + ec_clr_bit(0x3a, 6); +} + static void h8_log_ec_version(void) { char ecfw[17]; @@ -175,6 +185,11 @@ static void h8_enable(device_t dev) val = 1; h8_bluetooth_enable(val); + if (get_option(&val, "wwan") != CB_SUCCESS) + val = 1; + + h8_wwan_enable(val); + if (get_option(&val, "first_battery") != CB_SUCCESS) val = 1; -- cgit v1.2.3