summaryrefslogtreecommitdiff
path: root/sys/include/dev/usb/xhciregs.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/include/dev/usb/xhciregs.h')
-rw-r--r--sys/include/dev/usb/xhciregs.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/include/dev/usb/xhciregs.h b/sys/include/dev/usb/xhciregs.h
index 8c47739..1cbfd14 100644
--- a/sys/include/dev/usb/xhciregs.h
+++ b/sys/include/dev/usb/xhciregs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2023-2024 Ian Marco Moffett and the Osmora Team.
+ * Copyright (c) 2023-2025 Ian Marco Moffett and the Osmora Team.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -73,6 +73,7 @@ struct xhci_opregs {
/* USBCMD bits */
#define USBCMD_RUN BIT(0) /* Run/stop */
#define USBCMD_HCRST BIT(1) /* xHC reset */
+#define USBCMD_INTE BIT(2) /* Interrupt Enable */
/* USBSTS bits */
#define USBSTS_HCH BIT(0) /* HC halted */
@@ -97,6 +98,13 @@ struct xhci_opregs {
#define XHCI_RTS(BASE, RTSOFF) PTR_OFFSET(BASE, RTSOFF)
#define XHCI_CMD_DB(BASE, DBOFF) PTR_OFFSET(BASE, DBOFF)
+/* Runtime register offsets */
+#define XHCI_RT_IMAN 0x20
+#define XHCI_RT_IMOD 0x24
+#define XHCI_RT_ERSTSZ 0x28
+#define XHCI_RT_ERSTBA 0x30
+#define XHCI_RT_ERDP 0x38
+
/* Support protocol cap fields */
#define XHCI_PROTO_ID(PROTO) (PROTO & 0xFF)
#define XHCI_PROTO_MINOR(PROTO) ((PROTO >> 16) & 0xFF)
@@ -113,4 +121,8 @@ struct xhci_opregs {
#define XHCI_BIOS_SEM BIT(16)
#define XHCI_OS_SEM BIT(24)
+/* IMAN bits */
+#define XHCI_IMAN_IP BIT(0)
+#define XHCI_IMAN_IE BIT(1)
+
#endif /* !_USB_XHCIREGS_H_ */