summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorRaul E Rangel <rrangel@chromium.org>2020-07-10 13:58:48 -0600
committerFelix Held <felix-coreboot@felixheld.de>2020-07-12 17:01:24 +0000
commit2c952d6bd912605736e3a900c2f67cf0b6bec5b2 (patch)
tree38f0e0d452d99287465a81e28408b804f9dca7c5 /src/include
parentae0eeb2ab6038c9f8aaaef119c5a51395b401168 (diff)
device/xhci: Add helper method to iterate over xhci_supported_protocl
There is some boilerplate required to iterate over the USB supported protocol structs. Encapsulate all the in a method to make the callers simpler. BUG=b:154756391 TEST=Built test trembyle. Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I401f10d242638b0000ba697573856d765333dca0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/43352 Reviewed-by: Furquan Shaikh <furquan@google.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/device/xhci.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/include/device/xhci.h b/src/include/device/xhci.h
index 25f950be2e..17ce846459 100644
--- a/src/include/device/xhci.h
+++ b/src/include/device/xhci.h
@@ -52,6 +52,14 @@ enum cb_err xhci_for_each_ext_cap(const struct device *device, void *context,
void (*callback)(void *context,
const struct xhci_ext_cap *cap));
+/**
+ * Helper method that iterates over only the USB supported capabilities structures in the
+ * xHCI Extended Capabilities List.
+ */
+enum cb_err xhci_for_each_supported_usb_cap(
+ const struct device *device, void *context,
+ void (*callback)(void *context, const struct xhci_supported_protocol *data));
+
void xhci_print_supported_protocol(const struct xhci_supported_protocol *supported_protocol);
#endif /* __DEVICE_XHCI_H__ */