summaryrefslogtreecommitdiff
path: root/src/sys/include/io/usb/xhciregs.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sys/include/io/usb/xhciregs.h')
-rw-r--r--src/sys/include/io/usb/xhciregs.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/sys/include/io/usb/xhciregs.h b/src/sys/include/io/usb/xhciregs.h
index f2e572b..f849c54 100644
--- a/src/sys/include/io/usb/xhciregs.h
+++ b/src/sys/include/io/usb/xhciregs.h
@@ -32,6 +32,7 @@
#include <sys/types.h>
#include <sys/cdefs.h>
+#include <sys/param.h>
/*
* XHCI capability registers
@@ -69,4 +70,17 @@ struct __packed xhci_opregs {
volatile uint32_t reserved2;
};
+/*
+ * USB command register bits
+ *
+ * See section 5.4.1 of the xHCI spec
+ */
+#define USBCMD_HCRST BIT(1)
+
+/*
+ * Macros to get various register spaces
+ */
+#define XHCI_OPBASE(CAPBASE) \
+ PTR_OFFSET(CAPBASE, (CAPBASE)->caplength)
+
#endif /* !_XHCIREGS_H_ */