From d6f7fd52612e843894f3ea46e4aa50ef96ba221f Mon Sep 17 00:00:00 2001 From: Antonello Dettori Date: Wed, 10 Aug 2016 14:32:07 +0200 Subject: lenovo/x60: add GPIOs initialisation before dock check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add GPIOs initialisation before dock check. Needed in order to properly detect the presence or absence of the lenovo dock. Previously the check always reported the dock as connected and currently it always reports it as disconnected since the GPIOs are not properly initialised during the check. Tested and confirmed working. Change-Id: I7fbf8c2262a1eb5dee9cbe5e23bf44f7f8181009 Signed-off-by: Antonello Dettori Reviewed-on: https://review.coreboot.org/16139 Tested-by: build bot (Jenkins) Reviewed-by: Alexander Couzens Reviewed-by: Kyösti Mälkki --- src/mainboard/lenovo/x60/romstage.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mainboard/lenovo') diff --git a/src/mainboard/lenovo/x60/romstage.c b/src/mainboard/lenovo/x60/romstage.c index 1f249a624a..35d93454c2 100644 --- a/src/mainboard/lenovo/x60/romstage.c +++ b/src/mainboard/lenovo/x60/romstage.c @@ -224,6 +224,11 @@ void mainboard_romstage_entry(unsigned long bist) udelay(200 * 1000); pci_write_config16(PCI_DEV(0, 0x1e, 0), BCTRL, 0); + /* Enable GPIOs */ + pci_write_config32(PCI_DEV(0, 0x1f, 0), GPIOBASE, DEFAULT_GPIOBASE | 1); + pci_write_config8(PCI_DEV(0, 0x1f, 0), 0x4c, 0x10); /* 0x4c == GC */ + setup_ich7_gpios(); + ich7_enable_lpc(); dlpc_init(); -- cgit v1.2.3