diff options
Diffstat (limited to 'sys/include/dev/usb/xhcivar.h')
-rw-r--r-- | sys/include/dev/usb/xhcivar.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/sys/include/dev/usb/xhcivar.h b/sys/include/dev/usb/xhcivar.h index cd445c8..6d0e185 100644 --- a/sys/include/dev/usb/xhcivar.h +++ b/sys/include/dev/usb/xhcivar.h @@ -39,6 +39,7 @@ #define XHCI_EVRING_LEN 16 #define XHCI_TRB_SIZE 16 /* In bytes */ #define XHCI_MAX_PROTOS 4 +#define XHCI_IMOD_DEFAULT 0 /* * USB proto (USB 2.0 or 3.0) @@ -49,6 +50,43 @@ struct xhci_proto { uint8_t port_count; /* Number of ports */ }; +struct xhci_nop_trb { + uint32_t reserved; + uint32_t reserved1; + uint32_t reserved2; + uint8_t cycle : 1; + uint16_t reserved3 : 9; + uint8_t type : 6; + uint16_t reserved4; +}; + +struct xhci_enableslot_trb { + uint32_t reserved; + uint32_t reserved1; + uint32_t reserved2; + uint8_t cycle : 1; + uint16_t reserved3 : 9; + uint8_t type : 6; + uint8_t slot_type : 5; + uint16_t reserved4 : 10; +}; + +/* + * xHCI Transfer Request Block + */ +struct xhci_trb { + union { + struct xhci_nop_trb nop; + struct xhci_enableslot_trb enableslot; + struct { + uint32_t dword0; + uint32_t dword1; + uint32_t dword2; + uint32_t dword3; + }; + }; +}; + /* * xHCI event ring segment * @@ -77,4 +115,8 @@ struct xhci_hc { struct xhci_proto protos[XHCI_MAX_PROTOS]; }; +/* TRB types */ +#define XHCI_ENABLE_SLOT 9 +#define XHCI_LINK 6 + #endif /* !_USB_XHCIVAR_H_ */ |