From 01bf0020d2a90261e42c16bc10cd9280a285450e Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Wed, 6 Apr 2022 18:59:37 +0530 Subject: soc/intel/common/cse: Show CSE device slot and function number properly MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes a problem where the `is_cse_devfn_visible` function is unable to show the CSE device slot and function number properly.  BUG=b:211954778 TEST=Able to display CSE device slot and function number properly as below: Before: [DEBUG]  PCI: 00:16.0 final [WARN ]  HECI: CSE device 00.0 is disabled [WARN ]  HECI: CSE device 00.0 is disabled [WARN ]  HECI: CSE device 00.0 is disabled [WARN ]  HECI: CSE device 00.0 is disabled [WARN ]  HECI: CSE device 00.0 is disabled With this code changes: [DEBUG]  PCI: 00:16.0 final [WARN ]  HECI: CSE device 16.1 is disabled [WARN ]  HECI: CSE device 16.2 is disabled [WARN ]  HECI: CSE device 16.3 is disabled [WARN ]  HECI: CSE device 16.4 is disabled [WARN ]  HECI: CSE device 16.5 is disabled Signed-off-by: Subrata Banik Change-Id: I76a634c64af26fc0ac24e2c0bb3a8f397a65d77b Reviewed-on: https://review.coreboot.org/c/coreboot/+/63406 Tested-by: build bot (Jenkins) Reviewed-by: Lean Sheng Tan Reviewed-by: Eric Lai --- src/soc/intel/common/block/cse/cse.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/cse/cse.c b/src/soc/intel/common/block/cse/cse.c index 32b7f209a4..2444ceefb0 100644 --- a/src/soc/intel/common/block/cse/cse.c +++ b/src/soc/intel/common/block/cse/cse.c @@ -1012,11 +1012,11 @@ void cse_set_to_d0i3(void) void heci_set_to_d0i3(void) { for (int i = 0; i < CONFIG_MAX_HECI_DEVICES; i++) { - pci_devfn_t dev = PCI_DEV(0, PCI_SLOT(PCH_DEV_SLOT_CSE), PCI_FUNC(i)); - if (!is_cse_devfn_visible(dev)) + pci_devfn_t devfn = PCI_DEVFN(PCH_DEV_SLOT_CSE, i); + if (!is_cse_devfn_visible(devfn)) continue; - set_cse_device_state(dev, DEV_IDLE); + set_cse_device_state(devfn, DEV_IDLE); } } -- cgit v1.2.3