coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
xhci.h File Reference
#include <stdint.h>
#include <device/device.h>
#include <commonlib/bsd/cb_err.h>
Include dependency graph for xhci.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  xhci_supported_protocol
 
struct  xhci_ext_cap
 

Macros

#define XHCI_HCCPARAMS1_XECP   0x12
 
#define XHCI_ECP_CAP_ID_LEGACY   1
 
#define XHCI_ECP_CAP_ID_SUPP   2
 

Functions

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. More...
 
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 Capabilities List. More...
 
void xhci_print_supported_protocol (const struct xhci_supported_protocol *supported_protocol)
 

Macro Definition Documentation

◆ XHCI_ECP_CAP_ID_LEGACY

#define XHCI_ECP_CAP_ID_LEGACY   1

Definition at line 12 of file xhci.h.

◆ XHCI_ECP_CAP_ID_SUPP

#define XHCI_ECP_CAP_ID_SUPP   2

Definition at line 13 of file xhci.h.

◆ XHCI_HCCPARAMS1_XECP

#define XHCI_HCCPARAMS1_XECP   0x12

Definition at line 10 of file xhci.h.

Function Documentation

◆ xhci_for_each_ext_cap()

enum cb_err xhci_for_each_ext_cap ( const struct device device,
void context,
void(*)(void *context, const struct xhci_ext_cap *cap)  callback 
)

Iterates over the xHCI Extended Capabilities List.

Definition at line 1 of file xhci.c.

◆ xhci_for_each_supported_usb_cap()

enum cb_err xhci_for_each_supported_usb_cap ( const struct device device,
void context,
void(*)(void *context, const struct xhci_supported_protocol *data)  callback 
)

Helper method that iterates over only the USB supported capabilities structures in the xHCI Extended Capabilities List.

Definition at line 84 of file xhci.c.

References BIOS_DEBUG, supported_usb_cap_context::callback, xhci_ext_cap::cap_id, supported_usb_cap_context::context, memcmp(), xhci_supported_protocol::name, printk, xhci_ext_cap::supported_protocol, and XHCI_ECP_CAP_ID_SUPP.

Referenced by xhci_add_devices(), and xhci_port_exists().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ xhci_print_supported_protocol()

void xhci_print_supported_protocol ( const struct xhci_supported_protocol supported_protocol)