From 69dcc1e5154260359c516d85ab728a2094aa600b Mon Sep 17 00:00:00 2001 From: Werner Zeh Date: Thu, 21 Oct 2021 15:54:23 +0200 Subject: soc/intel/apollolake: Fix BUG-message when checking for XDCI device The current check for XDCI enabled uses a static device path to an internal PCI device at a very late point in the boot flow. At this time the devicetree has been processed and disabled devices have been already removed. If this device (00:15.1, XDCI) is disabled in devicetree this will trigger the message 'BUG: check_xdci_enable requests hidden 00:15.1' in the log. This looks weird and is wrong since it is not a bug to disable this device when it is not needed. To avoid this look up the devicetree by a tree walk instead of using a static value for the devicetree. Change-Id: If193be724299c4017e7e10142fac8db9fac44383 Signed-off-by: Werner Zeh Reviewed-on: https://review.coreboot.org/c/coreboot/+/58524 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Patrick Georgi Reviewed-by: Angel Pons --- src/soc/intel/apollolake/chip.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/soc/intel/apollolake') diff --git a/src/soc/intel/apollolake/chip.c b/src/soc/intel/apollolake/chip.c index 057138c803..651bd8418c 100644 --- a/src/soc/intel/apollolake/chip.c +++ b/src/soc/intel/apollolake/chip.c @@ -744,9 +744,7 @@ static void configure_xhci_host_mode_port0(void) static int check_xdci_enable(void) { - struct device *dev = PCH_DEV_XDCI; - - return !!dev->enabled; + return is_dev_enabled(pcidev_path_on_root(PCH_DEVFN_XDCI)); } static void disable_xhci_lfps_pm(void) -- cgit v1.2.3