coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
xhci.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #ifndef __DEVICE_XHCI_H__
4 #define __DEVICE_XHCI_H__
5 
6 #include <stdint.h>
7 #include <device/device.h>
8 #include <commonlib/bsd/cb_err.h>
9 
10 #define XHCI_HCCPARAMS1_XECP 0x12
11 
12 #define XHCI_ECP_CAP_ID_LEGACY 1
13 #define XHCI_ECP_CAP_ID_SUPP 2
14 
16  union {
18  struct {
23  };
24  };
25  union {
27  char name[4];
28  };
29  union {
31  struct {
36  };
37  };
38 };
39 
40 struct xhci_ext_cap {
42  /* cap_id is used to select the correct struct in the union. */
43  union {
45  };
46 };
47 
48 /**
49  * Iterates over the xHCI Extended Capabilities List.
50  */
51 enum cb_err xhci_for_each_ext_cap(const struct device *device, void *context,
52  void (*callback)(void *context,
53  const struct xhci_ext_cap *cap));
54 
55 /**
56  * Helper method that iterates over only the USB supported capabilities structures in the
57  * xHCI Extended Capabilities List.
58  */
60  const struct device *device, void *context,
61  void (*callback)(void *context, const struct xhci_supported_protocol *data));
62 
63 void xhci_print_supported_protocol(const struct xhci_supported_protocol *supported_protocol);
64 
65 #endif /* __DEVICE_XHCI_H__ */
cb_err
coreboot error codes
Definition: cb_err.h:15
enum cb_err xhci_for_each_ext_cap(const struct device *device, void *context, void(*callback)(void *context, const struct xhci_ext_cap *cap))
Iterates over the xHCI Extended Capabilities List.
Definition: xhci.c:18
void xhci_print_supported_protocol(const struct xhci_supported_protocol *supported_protocol)
Definition: xhci.c:115
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))
Helper method that iterates over only the USB supported capabilities structures in the xHCI Extended ...
Definition: xhci.c:103
unsigned int uint32_t
Definition: stdint.h:14
Definition: device.h:107
uint32_t cap_id
Definition: xhci.h:41
struct xhci_supported_protocol supported_protocol
Definition: xhci.h:44
uint32_t port_count
Definition: xhci.h:33
uint32_t next_ptr
Definition: xhci.h:20
uint32_t cap_id
Definition: xhci.h:19
uint32_t minor_rev
Definition: xhci.h:21
uint32_t port_offset
Definition: xhci.h:32
uint32_t protocol_speed_id_count
Definition: xhci.h:35
uint32_t reserved
Definition: xhci.h:34
uint32_t major_rev
Definition: xhci.h:22