UPSTREAM: lenovo/x60: add GPIOs initialisation before dock check
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. BUG=None BRANCH=None TEST=None Signed-off-by: Antonello Dettori <dev@dettori.io> Reviewed-on: https://review.coreboot.org/16139 Reviewed-by: Alexander Couzens <lynxis@fe80.eu> Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com> Change-Id: I7fbf8c2262a1eb5dee9cbe5e23bf44f7f8181009 Reviewed-on: https://chromium-review.googlesource.com/369145 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
af42a5bd75
commit
4e138c2f13
1 changed files with 5 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue