From a6909f88e95e1ba48e84207f146c9f9a01c7dd32 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Mon, 22 May 2017 18:30:27 +0200 Subject: device/device_util: Add function to determine bridge state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a method to get the state of a bridge device. Return true if at least one enabled device on the secondary bus is found. Useful to disable non hotplugable bridges without any devices attached. Change-Id: Ic8fe539d233031d4d177b03dd2c03edb5ab8c88d Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/19817 Tested-by: build bot (Jenkins) Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Martin Roth --- 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 7b4fce36ea..5bc4d1c2f9 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -190,6 +190,7 @@ u32 dev_path_encode(device_t dev); const char *bus_path(struct bus *bus); void dev_set_enabled(device_t dev, int enable); void disable_children(struct bus *bus); +bool dev_is_active_bridge(device_t dev); /* Option ROM helper functions */ void run_bios(struct device *dev, unsigned long addr); -- cgit v1.2.3