summaryrefslogtreecommitdiff
path: root/sys/include/dev
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-01-08 22:02:03 -0500
committerIan Moffett <ian@osmora.org>2025-01-08 22:02:03 -0500
commitc7d979e85dca9e6a480b44c0ccb0ef8cc60f7e6b (patch)
tree4e79fe1f9662165f84a3516b874b22bf4b0ad5fc /sys/include/dev
parentb5c65e3022f285d389759bb699a9cefee79c5fd0 (diff)
kernel: xhci: Add TRB definitionsexpt
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/dev')
-rw-r--r--sys/include/dev/usb/xhcivar.h41
1 files changed, 41 insertions, 0 deletions
diff --git a/sys/include/dev/usb/xhcivar.h b/sys/include/dev/usb/xhcivar.h
index 4b0f1bf..6d0e185 100644
--- a/sys/include/dev/usb/xhcivar.h
+++ b/sys/include/dev/usb/xhcivar.h
@@ -50,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
*
@@ -78,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_ */