From 883e7acc65e1edba8b2453decf23c88eafeae8b0 Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Wed, 13 Aug 2014 01:22:13 +0200 Subject: lenovo/h8: Support uwb radio. It's the third minipcie slot in x200. Change-Id: Ibfa8d787698cd23b4abcffe5cff2d62039cf0f86 Signed-off-by: Vladimir Serbinenko Reviewed-on: http://review.coreboot.org/6641 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan Reviewed-by: Paul Menzel --- src/ec/lenovo/h8/h8.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/ec/lenovo/h8/h8.c') diff --git a/src/ec/lenovo/h8/h8.c b/src/ec/lenovo/h8/h8.c index f5b1b77ec8..e70c0e8ed0 100644 --- a/src/ec/lenovo/h8/h8.c +++ b/src/ec/lenovo/h8/h8.c @@ -63,6 +63,15 @@ static void h8_wwan_enable(int on) ec_clr_bit(0x3a, 6); } +/* Controls radio-off pin in UWB MiniPCIe slot. */ +static void h8_uwb_enable(int on) +{ + if (on) + ec_set_bit(0x31, 2); + else + ec_clr_bit(0x31, 2); +} + static void h8_fn_ctrl_swap(int on) { if (on) @@ -239,6 +248,13 @@ static void h8_enable(device_t dev) h8_wwan_enable(val); + if (conf->has_uwb) { + if (get_option(&val, "uwb") != CB_SUCCESS) + val = 1; + + h8_uwb_enable(val); + } + if (get_option(&val, "fn_ctrl_swap") != CB_SUCCESS) val = 0; h8_fn_ctrl_swap(val); -- cgit v1.2.3