summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2022-08-05 12:58:18 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-08-17 16:29:39 +0000
commit5ffc2c8a3f38fbb7be2faadf207590acd3999205 (patch)
treec46ac16e011b35867b67550a66a57ee0a7333b8c /src/include
parentd5ab24cd48006022ca60fe35f0f0366f3edce748 (diff)
pciexp_device: Join pciexp_find_(next_)extended_cap() APIs
Move the `offset` parameter into pciexp_find_extended_cap(). If it's called with `0`, we start a new search. If it's an existing offset, we continue the search. This makes it easier to search for multiple occurences of a capa- bility in a single loop. Change-Id: I80115372a82523b90460d97f0fd0fa565c3f56cb Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/66453 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/device/pciexp.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/include/device/pciexp.h b/src/include/device/pciexp.h
index 13776dfa72..5a996834d2 100644
--- a/src/include/device/pciexp.h
+++ b/src/include/device/pciexp.h
@@ -32,9 +32,8 @@ void pciexp_hotplug_scan_bridge(struct device *dev);
extern struct device_operations default_pciexp_hotplug_ops_bus;
-unsigned int pciexp_find_extended_cap(const struct device *dev, unsigned int cap);
-unsigned int pciexp_find_next_extended_cap(const struct device *dev, unsigned int cap,
- unsigned int offset);
+unsigned int pciexp_find_extended_cap(const struct device *dev, unsigned int cap,
+ unsigned int offset);
static inline bool pciexp_is_downstream_port(int type)
{