From 7567890110db2f7f8a686c87268911e06d4cdc8f Mon Sep 17 00:00:00 2001 From: Tim Wawrzynczak Date: Mon, 21 Dec 2020 17:02:18 -0700 Subject: soc/intel/common: Fix XHCI elog driver Commit 56fcfb5 misused the PCH_DEVFNs passed to the XHCI elog driver, by passing them directly to pci_s_read_config32. This is incorrect, as it is the wrong PCI devfn encoding to pass to that function. BUG=b:175996770 TEST=abuild Change-Id: Id7c146c1f50ee64a725bd50f9f11a7f159013a2b Signed-off-by: Tim Wawrzynczak Reviewed-on: https://review.coreboot.org/c/coreboot/+/48827 Tested-by: build bot (Jenkins) Reviewed-by: Sukumar Ghorai Reviewed-by: Furquan Shaikh --- src/soc/intel/common/block/xhci/elog.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/xhci/elog.c b/src/soc/intel/common/block/xhci/elog.c index fb598978bd..e6a1c0f5da 100644 --- a/src/soc/intel/common/block/xhci/elog.c +++ b/src/soc/intel/common/block/xhci/elog.c @@ -105,8 +105,9 @@ bool xhci_update_wake_event(const struct xhci_wake_info *wake_info, for (i = 0; i < wake_info_count; ++i) { /* Assumes BAR0 is MBAR */ - mmio_base = pci_s_read_config32(wake_info[i].xhci_dev, - PCI_BASE_ADDRESS_0); + pci_devfn_t devfn = PCI_DEV(0, PCI_SLOT(wake_info[i].xhci_dev), + PCI_FUNC(wake_info[i].xhci_dev)); + mmio_base = pci_s_read_config32(devfn, PCI_BASE_ADDRESS_0); mmio_base &= ~PCI_BASE_ADDRESS_MEM_ATTR_MASK; usb_info = soc_get_xhci_usb_info(wake_info[i].xhci_dev); -- cgit v1.2.3