From fffc9f3b9d9de4909d35da0fb4006d5080bb8e27 Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Wed, 3 Jul 2019 09:55:01 +0300 Subject: device/pci: Declare pci_root_bus() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is used a lot, cache the result so search of domain from devicetree is only done once. Improvement only applies when MAYBE_STATIC evaluates to static. Change-Id: If675abb632fe68acd59ba0bdfef854da3e0839a9 Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/c/coreboot/+/34004 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Nico Huber Reviewed-by: Angel Pons --- src/include/device/device.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/device/device.h') diff --git a/src/include/device/device.h b/src/include/device/device.h index 8e9454c4e1..a200de0876 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -289,6 +289,7 @@ DEVTREE_CONST struct device *pcidev_path_behind(const struct bus *parent, pci_devfn_t devfn); DEVTREE_CONST struct device *pcidev_path_on_root(pci_devfn_t devfn); DEVTREE_CONST struct device *pcidev_on_root(uint8_t dev, uint8_t fn); +DEVTREE_CONST struct bus *pci_root_bus(void); void scan_smbus(struct device *bus); void scan_generic_bus(struct device *bus); -- cgit v1.2.3