summaryrefslogtreecommitdiff
path: root/src/mainboard/lenovo/x201/dock.c
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2014-08-19 00:48:39 +0200
committerVladimir Serbinenko <phcoder@gmail.com>2014-08-19 20:27:52 +0200
commitf319ae40d702b3012429d09a05633eadd18ea4c2 (patch)
tree8d3fc9825431f716df61ce08d800cfd29be213cc /src/mainboard/lenovo/x201/dock.c
parentdc9cfa431e46d6083ebb83fff5be22de7969bb26 (diff)
lenovo/x201: Unpower USB on undocking
Change-Id: I9b496e8ff92ee575d0b780eab0cb45ea05506d30 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-on: http://review.coreboot.org/6708 Tested-by: build bot (Jenkins) Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/mainboard/lenovo/x201/dock.c')
-rw-r--r--src/mainboard/lenovo/x201/dock.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mainboard/lenovo/x201/dock.c b/src/mainboard/lenovo/x201/dock.c
index fbcf99e76a..087cf21220 100644
--- a/src/mainboard/lenovo/x201/dock.c
+++ b/src/mainboard/lenovo/x201/dock.c
@@ -42,16 +42,24 @@ void h8_mainboard_init_dock (void)
void dock_connect(void)
{
+ u16 gpiobase = pci_read_config16(PCH_LPC_DEV, GPIO_BASE) & 0xfffc;
+
ec_set_bit(0x02, 0);
ec_set_bit(0x1a, 0);
ec_set_bit(0xfe, 4);
+
+ outl(inl(gpiobase + 0x0c) | (1 << 28), gpiobase + 0x0c);
}
void dock_disconnect(void)
{
+ u16 gpiobase = pci_read_config16(PCH_LPC_DEV, GPIO_BASE) & 0xfffc;
+
ec_clr_bit(0x02, 0);
ec_clr_bit(0x1a, 0);
ec_clr_bit(0xfe, 4);
+
+ outl(inl(gpiobase + 0x0c) & ~(1 << 28), gpiobase + 0x0c);
}
int dock_present(void)